blob: e3544c7320ff6a3a1f63c9915afcb63d6206ab8c [file] [log] [blame]
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: always_specify_types, public_member_api_docs
part of 'shell_route_example.dart';
// **************************************************************************
// GoRouterGenerator
// **************************************************************************
List<RouteBase> get $appRoutes => [
$loginRoute,
$myShellRouteData,
];
RouteBase get $loginRoute => GoRouteData.$route(
path: '/login',
factory: $LoginRouteExtension._fromState,
);
extension $LoginRouteExtension on LoginRoute {
static LoginRoute _fromState(GoRouterState state) => const LoginRoute();
String get location => GoRouteData.$location(
'/login',
);
void go(BuildContext context) => context.go(location);
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
void pushReplacement(BuildContext context) =>
context.pushReplacement(location);
}
RouteBase get $myShellRouteData => ShellRouteData.$route(
factory: $MyShellRouteDataExtension._fromState,
routes: [
GoRouteData.$route(
path: '/foo',
factory: $FooRouteDataExtension._fromState,
),
GoRouteData.$route(
path: '/bar',
factory: $BarRouteDataExtension._fromState,
),
],
);
extension $MyShellRouteDataExtension on MyShellRouteData {
static MyShellRouteData _fromState(GoRouterState state) =>
const MyShellRouteData();
}
extension $FooRouteDataExtension on FooRouteData {
static FooRouteData _fromState(GoRouterState state) => const FooRouteData();
String get location => GoRouteData.$location(
'/foo',
);
void go(BuildContext context) => context.go(location);
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
void pushReplacement(BuildContext context) =>
context.pushReplacement(location);
}
extension $BarRouteDataExtension on BarRouteData {
static BarRouteData _fromState(GoRouterState state) => const BarRouteData();
String get location => GoRouteData.$location(
'/bar',
);
void go(BuildContext context) => context.go(location);
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
void pushReplacement(BuildContext context) =>
context.pushReplacement(location);
}