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:
Adam Barth 2016-05-11 18:25:56 -07:00
parent f0a8ee2a86
commit cc2f8feedc

View File

@ -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,