NamedRouteDef.guarded constructor

NamedRouteDef.guarded({
  1. String? path,
  2. required String name,
  3. required OnNavigation onNavigation,
  4. bool fullscreenDialog = false,
  5. bool maintainState = true,
  6. bool fullMatch = false,
  7. bool usesPathAsKey = false,
  8. List<AutoRoute>? children,
  9. Map<String, dynamic> meta = const {},
  10. TitleBuilder? title,
  11. bool keepHistory = true,
  12. bool initial = false,
  13. bool allowSnapshotting = true,
  14. RestorationIdBuilder? restorationId,
  15. RouteType? type,
  16. 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),
      );