go router added
This commit is contained in:
@@ -0,0 +1,136 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'app_routes.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// GoRouterGenerator
|
||||
// **************************************************************************
|
||||
|
||||
List<RouteBase> get $appRoutes => [$loginScreenRoute, $appShellRouteData];
|
||||
|
||||
RouteBase get $loginScreenRoute =>
|
||||
GoRouteData.$route(path: '/login', factory: _$LoginScreenRoute._fromState);
|
||||
|
||||
mixin _$LoginScreenRoute on GoRouteData {
|
||||
static LoginScreenRoute _fromState(GoRouterState state) =>
|
||||
const LoginScreenRoute();
|
||||
|
||||
@override
|
||||
String get location => GoRouteData.$location('/login');
|
||||
|
||||
@override
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@override
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
@override
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
@override
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
RouteBase get $appShellRouteData => StatefulShellRouteData.$route(
|
||||
parentNavigatorKey: AppShellRouteData.$parentNavigatorKey,
|
||||
factory: $AppShellRouteDataExtension._fromState,
|
||||
branches: [
|
||||
StatefulShellBranchData.$branch(
|
||||
navigatorKey: HomeBranch.$navigatorKey,
|
||||
|
||||
routes: [
|
||||
GoRouteData.$route(path: '/home', factory: _$HomeRouteData._fromState),
|
||||
],
|
||||
),
|
||||
StatefulShellBranchData.$branch(
|
||||
navigatorKey: TendersBranch.$navigatorKey,
|
||||
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: '/tenders',
|
||||
|
||||
factory: _$TendersRouteData._fromState,
|
||||
),
|
||||
],
|
||||
),
|
||||
StatefulShellBranchData.$branch(
|
||||
navigatorKey: ProfileBranch.$navigatorKey,
|
||||
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: '/profile',
|
||||
|
||||
factory: _$ProfileRouteData._fromState,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
extension $AppShellRouteDataExtension on AppShellRouteData {
|
||||
static AppShellRouteData _fromState(GoRouterState state) =>
|
||||
const AppShellRouteData();
|
||||
}
|
||||
|
||||
mixin _$HomeRouteData on GoRouteData {
|
||||
static HomeRouteData _fromState(GoRouterState state) => const HomeRouteData();
|
||||
|
||||
@override
|
||||
String get location => GoRouteData.$location('/home');
|
||||
|
||||
@override
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@override
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
@override
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
@override
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
mixin _$TendersRouteData on GoRouteData {
|
||||
static TendersRouteData _fromState(GoRouterState state) =>
|
||||
const TendersRouteData();
|
||||
|
||||
@override
|
||||
String get location => GoRouteData.$location('/tenders');
|
||||
|
||||
@override
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@override
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
@override
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
@override
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
mixin _$ProfileRouteData on GoRouteData {
|
||||
static ProfileRouteData _fromState(GoRouterState state) =>
|
||||
const ProfileRouteData();
|
||||
|
||||
@override
|
||||
String get location => GoRouteData.$location('/profile');
|
||||
|
||||
@override
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@override
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
@override
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
@override
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
Reference in New Issue
Block a user