AutoRoute constructor

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