AutoRoute constructor
AutoRoute({
- required PageInfo page,
- String? path,
- bool usesPathAsKey = false,
- List<
AutoRouteGuard> guards = const [], - 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,
Builds a default AutoRoute instance with any type
Implementation
factory AutoRoute({
required PageInfo page,
String? path,
bool usesPathAsKey = false,
List<AutoRouteGuard> guards = const [],
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._(
name: page.name,
path: path,
fullMatch: fullMatch,
maintainState: maintainState,
fullscreenDialog: fullscreenDialog,
meta: meta,
type: type,
usesPathAsKey: usesPathAsKey,
guards: guards,
restorationId: restorationId,
children: children,
title: title,
keepHistory: keepHistory,
initial: initial,
allowSnapshotting: allowSnapshotting,
);
}