Add asserts to DefaultTextStyle.inherit (#3844)
The context and child arguments are required. We should assert that they're non-null. Fixes #3843
This commit is contained in:
parent
f0a8ee2a86
commit
cc2f8feedc
@ -1994,6 +1994,8 @@ class DefaultTextStyle extends InheritedWidget {
|
|||||||
TextOverflow overflow,
|
TextOverflow overflow,
|
||||||
Widget child
|
Widget child
|
||||||
}) {
|
}) {
|
||||||
|
assert(context != null);
|
||||||
|
assert(child != null);
|
||||||
DefaultTextStyle parent = DefaultTextStyle.of(context);
|
DefaultTextStyle parent = DefaultTextStyle.of(context);
|
||||||
return new DefaultTextStyle(
|
return new DefaultTextStyle(
|
||||||
key: key,
|
key: key,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user