blob: 09d957cb075cafc5f647dee4961537f89fc324d7 [file] [log] [blame]
RouteBase get $nonNullableRequiredParamNotInPath => GoRouteData.$route(
path: 'bob',
factory: $NonNullableRequiredParamNotInPathExtension._fromState,
);
extension $NonNullableRequiredParamNotInPathExtension
on NonNullableRequiredParamNotInPath {
static NonNullableRequiredParamNotInPath _fromState(GoRouterState state) =>
NonNullableRequiredParamNotInPath(
id: int.parse(state.uri.queryParameters['id']!),
);
String get location => GoRouteData.$location(
'bob',
queryParams: {
'id': id.toString(),
},
);
void go(BuildContext context) => context.go(location);
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
void pushReplacement(BuildContext context) =>
context.pushReplacement(location);
void replace(BuildContext context) => context.replace(location);
}