barcode_scanner/lib/router/go_secure_router_builder.g.dart
mandreshope 94b4fc1723 refactor: Refactor login flow and add product form route
Refactors the login page and model for improved separation of concerns. Moves navigation logic from the model to the page using success callbacks. Integrates a dedicated primary button component for the login action, showing loading state.

Adds a new secure route for a product form page and updates the scanner page to navigate to it when viewing scanned product details.

Simplifies the callback signature for viewing product details in the scanned product component. Also includes minor adjustments to the splash screen delay and theme definition.
2025-06-23 10:22:24 +03:00

106 lines
2.8 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,
),
],
);
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);
}