Move -referencing asserts to constructor body. (#12478)
This commit is contained in:
parent
7f5b973cb1
commit
c38b843460
@ -88,8 +88,9 @@ class CupertinoPageRoute<T> extends PageRoute<T> {
|
|||||||
assert(settings != null),
|
assert(settings != null),
|
||||||
assert(maintainState != null),
|
assert(maintainState != null),
|
||||||
assert(fullscreenDialog != null),
|
assert(fullscreenDialog != null),
|
||||||
assert(opaque), // PageRoute makes it return true.
|
super(settings: settings, fullscreenDialog: fullscreenDialog) {
|
||||||
super(settings: settings, fullscreenDialog: fullscreenDialog);
|
assert(opaque); // PageRoute makes it return true.
|
||||||
|
}
|
||||||
|
|
||||||
/// Builds the primary contents of the route.
|
/// Builds the primary contents of the route.
|
||||||
final WidgetBuilder builder;
|
final WidgetBuilder builder;
|
||||||
|
@ -70,8 +70,9 @@ class MaterialPageRoute<T> extends PageRoute<T> {
|
|||||||
this.maintainState: true,
|
this.maintainState: true,
|
||||||
bool fullscreenDialog: false,
|
bool fullscreenDialog: false,
|
||||||
}) : assert(builder != null),
|
}) : assert(builder != null),
|
||||||
assert(opaque),
|
super(settings: settings, fullscreenDialog: fullscreenDialog) {
|
||||||
super(settings: settings, fullscreenDialog: fullscreenDialog);
|
assert(opaque);
|
||||||
|
}
|
||||||
|
|
||||||
/// Builds the primary contents of the route.
|
/// Builds the primary contents of the route.
|
||||||
final WidgetBuilder builder;
|
final WidgetBuilder builder;
|
||||||
|
@ -81,10 +81,11 @@ class PageRouteBuilder<T> extends PageRoute<T> {
|
|||||||
this.maintainState: true,
|
this.maintainState: true,
|
||||||
}) : assert(pageBuilder != null),
|
}) : assert(pageBuilder != null),
|
||||||
assert(transitionsBuilder != null),
|
assert(transitionsBuilder != null),
|
||||||
assert(opaque != null),
|
|
||||||
assert(barrierDismissible != null),
|
assert(barrierDismissible != null),
|
||||||
assert(maintainState != null),
|
assert(maintainState != null),
|
||||||
super(settings: settings);
|
super(settings: settings) {
|
||||||
|
assert(opaque != null);
|
||||||
|
}
|
||||||
|
|
||||||
/// Used build the route's primary contents.
|
/// Used build the route's primary contents.
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user