PageRouteBuilder<T> constructor Null safety

PageRouteBuilder<T>(
  1. {RouteSettings? settings,
  2. required RoutePageBuilder pageBuilder,
  3. RouteTransitionsBuilder transitionsBuilder,
  4. Duration transitionDuration,
  5. Duration reverseTransitionDuration,
  6. bool opaque,
  7. bool barrierDismissible,
  8. Color? barrierColor,
  9. String? barrierLabel,
  10. bool maintainState,
  11. bool fullscreenDialog = false}
)

Creates a route that delegates to builder callbacks.

The pageBuilder, transitionsBuilder, opaque, barrierDismissible, maintainState, and fullscreenDialog arguments must not be null.

Implementation

PageRouteBuilder({
  RouteSettings? settings,
  required this.pageBuilder,
  this.transitionsBuilder = _defaultTransitionsBuilder,
  this.transitionDuration = const Duration(milliseconds: 300),
  this.reverseTransitionDuration = const Duration(milliseconds: 300),
  this.opaque = true,
  this.barrierDismissible = false,
  this.barrierColor,
  this.barrierLabel,
  this.maintainState = true,
  bool fullscreenDialog = false,
}) : assert(pageBuilder != null),
     assert(transitionsBuilder != null),
     assert(opaque != null),
     assert(barrierDismissible != null),
     assert(maintainState != null),
     assert(fullscreenDialog != null),
     super(settings: settings, fullscreenDialog: fullscreenDialog);