
Introduces a side navigation drawer on the home page to improve navigation and centralize user actions. Displays the logged-in user's information (name, email) in the drawer header. Adds a link to the Product List page ("Inventaire") within the drawer. Moves the logout functionality to the drawer, ensuring user data is also cleared from local storage upon logout. Ensures user data is saved to local storage during the login process and fetched when the home page loads. Includes minor text updates on the Product Form page.
132 lines
3.5 KiB
Dart
132 lines
3.5 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'go_secure_router_builder.dart';
|
|
|
|
// **************************************************************************
|
|
// GoRouterGenerator
|
|
// **************************************************************************
|
|
|
|
List<RouteBase> get $appRoutes => [$secureRoute];
|
|
|
|
RouteBase get $secureRoute => GoRouteData.$route(
|
|
path: '/SecurePage',
|
|
|
|
factory: _$SecureRoute._fromState,
|
|
routes: [
|
|
GoRouteData.$route(path: 'HomePage', factory: _$HomeRoute._fromState),
|
|
GoRouteData.$route(path: 'ScannerPage', factory: _$ScannerRoute._fromState),
|
|
GoRouteData.$route(
|
|
path: 'ProductFormPage',
|
|
|
|
factory: _$ProductFormRoute._fromState,
|
|
),
|
|
GoRouteData.$route(
|
|
path: 'ProductListPage',
|
|
|
|
factory: _$ProductListRoute._fromState,
|
|
),
|
|
],
|
|
);
|
|
|
|
mixin _$SecureRoute on GoRouteData {
|
|
static SecureRoute _fromState(GoRouterState state) => const SecureRoute();
|
|
|
|
@override
|
|
String get location => GoRouteData.$location('/SecurePage');
|
|
|
|
@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 _$HomeRoute on GoRouteData {
|
|
static HomeRoute _fromState(GoRouterState state) => const HomeRoute();
|
|
|
|
@override
|
|
String get location => GoRouteData.$location('/SecurePage/HomePage');
|
|
|
|
@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 _$ScannerRoute on GoRouteData {
|
|
static ScannerRoute _fromState(GoRouterState state) => const ScannerRoute();
|
|
|
|
@override
|
|
String get location => GoRouteData.$location('/SecurePage/ScannerPage');
|
|
|
|
@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 _$ProductFormRoute on GoRouteData {
|
|
static ProductFormRoute _fromState(GoRouterState state) =>
|
|
const ProductFormRoute();
|
|
|
|
@override
|
|
String get location => GoRouteData.$location('/SecurePage/ProductFormPage');
|
|
|
|
@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 _$ProductListRoute on GoRouteData {
|
|
static ProductListRoute _fromState(GoRouterState state) =>
|
|
const ProductListRoute();
|
|
|
|
@override
|
|
String get location => GoRouteData.$location('/SecurePage/ProductListPage');
|
|
|
|
@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);
|
|
}
|