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