blob: b3ad338d4f37171d68e9f38f6216a2364b26605c [file] [log] [blame]
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: always_specify_types, public_member_api_docs
part of 'simple_example.dart';
// **************************************************************************
// GoRouterGenerator
// **************************************************************************
List<GoRoute> get $appRoutes => [
$homeRoute,
];
GoRoute get $homeRoute => GoRouteData.$route(
path: '/',
factory: $HomeRouteExtension._fromState,
routes: [
GoRouteData.$route(
path: 'family/:familyId',
factory: $FamilyRouteExtension._fromState,
),
],
);
extension $HomeRouteExtension on HomeRoute {
static HomeRoute _fromState(GoRouterState state) => const HomeRoute();
String get location => GoRouteData.$location(
'/',
);
void go(BuildContext context) => context.go(location, extra: this);
void push(BuildContext context) => context.push(location, extra: this);
}
extension $FamilyRouteExtension on FamilyRoute {
static FamilyRoute _fromState(GoRouterState state) => FamilyRoute(
state.params['familyId']!,
);
String get location => GoRouteData.$location(
'/family/${Uri.encodeComponent(familyId)}',
);
void go(BuildContext context) => context.go(location, extra: this);
void push(BuildContext context) => context.push(location, extra: this);
}