NamedRouteDef.guarded constructor
NamedRouteDef.guarded({
- String? path,
- required String name,
- bool fullscreenDialog = false,
- bool maintainState = true,
- bool fullMatch = false,
- bool usesPathAsKey = false,
- List<
AutoRoute> ? children, - Map<
String, dynamic> meta = const {}, - TitleBuilder? title,
- bool keepHistory = true,
- bool initial = false,
- bool allowSnapshotting = true,
- RestorationIdBuilder? restorationId,
- RouteType? type,
- required WidgetBuilderWithData builder,
Creates a guarded route
Implementation
NamedRouteDef.guarded({
super.path,
required String name,
required OnNavigation onNavigation,
super.fullscreenDialog,
super.maintainState,
super.fullMatch = false,
super.usesPathAsKey = false,
super.children,
super.meta = const {},
super.title,
super.keepHistory,
super.initial,
super.allowSnapshotting = true,
super.restorationId,
super.type,
required WidgetBuilderWithData builder,
}) : super._(
guards: [AutoRouteGuard.simple(onNavigation)],
page: PageInfo.builder(name, builder: builder),
);