NavigationPage constructor
NavigationPage({
- required String path,
- required Widget builder(),
- bool fullscreenDialog = false,
- bool maintainState = true,
- Duration? transitionDuration,
- List<
PageValidator> validators = const <PageValidator>[], - String? restorationId,
- String? name,
- RouteTransitionsBuilder? transitionsBuilder,
Is used to create a new instance of NavigationPage
Implementation
NavigationPage({
required this.path,
required this.builder,
this.fullscreenDialog = false,
this.maintainState = true,
this.transitionDuration,
this.validators = const <PageValidator>[],
this.restorationId,
this.name,
this.transitionsBuilder,
}) : assert(() {
if (path.isEmpty || path[0] != '/') {
throw const NavigationException(
'NavigationPage.path must begin with "/"',
);
}
return true;
}()),
hasPathParams = path.contains('/:');