MaterialPageRoute<T> constructor
Null safety
- {required WidgetBuilder builder,
- RouteSettings? settings,
- bool maintainState = true,
- bool fullscreenDialog = false,
- bool preferRasterization = true}
Construct a MaterialPageRoute whose contents are defined by builder.
The values of builder, maintainState, and PageRoute.fullscreenDialog must not be null.
Implementation
MaterialPageRoute({
required this.builder,
super.settings,
this.maintainState = true,
super.fullscreenDialog,
super.preferRasterization = true,
}) : assert(builder != null),
assert(maintainState != null),
assert(fullscreenDialog != null) {
assert(opaque);
}