Fix localizations so that extract_messages is happy. (#11894)

extract_messages script currently fails to parse this file because of its use of static asserts, super and a ctr body. Since we already have an assert in the body, I think it is also more readable to put all of them together. _LocalizationScope follows the same pattern above.
This commit is contained in:
Mehmet Fidanboylu 2017-09-01 10:15:29 -07:00 committed by GitHub
parent eba6ceb85d
commit eae9e053e3

View file

@ -289,9 +289,9 @@ class Localizations extends StatefulWidget {
@required this.locale,
@required this.delegates,
this.child,
}) : assert(locale != null),
assert(delegates != null),
super(key: key) {
}) : super(key: key) {
assert(locale != null);
assert(delegates != null);
assert(delegates.any((LocalizationsDelegate<dynamic> delegate) => delegate is LocalizationsDelegate<WidgetsLocalizations>));
}