CupertinoPageRoute<T> constructor Null safety

CupertinoPageRoute<T>(
  1. {required WidgetBuilder builder,
  2. String? title,
  3. RouteSettings? settings,
  4. bool maintainState = true,
  5. bool fullscreenDialog = false,
  6. bool preferRasterization = true}
)

Creates a page route for use in an iOS designed app.

The builder, maintainState, and fullscreenDialog arguments must not be null.

Implementation

CupertinoPageRoute({
  required this.builder,
  this.title,
  super.settings,
  this.maintainState = true,
  super.fullscreenDialog,
  super.preferRasterization = true,
}) : assert(builder != null),
     assert(maintainState != null),
     assert(fullscreenDialog != null) {
  assert(opaque);
}