forked from firka/flutter
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:
@@ -1994,6 +1994,8 @@ class DefaultTextStyle extends InheritedWidget {
|
||||
TextOverflow overflow,
|
||||
Widget child
|
||||
}) {
|
||||
assert(context != null);
|
||||
assert(child != null);
|
||||
DefaultTextStyle parent = DefaultTextStyle.of(context);
|
||||
return new DefaultTextStyle(
|
||||
key: key,
|
||||
|
||||
Reference in New Issue
Block a user