
Moves product lookup from external API calls to a local ObjectBox database. This improves performance and enables offline product identification during scanning. Removes the standalone scanner page, consolidating barcode scanning functionality directly into the reception flow for a more streamlined user experience. Updates ObjectBox entity fields by removing `final` modifiers, allowing the database to manage and update persisted data effectively. Introduces new methods in the reception scan model to support local product checks, retrieval, and quantity increment for scanned items.
259 lines
6.8 KiB
Dart
259 lines
6.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: 'ProductFormPage',
|
|
|
|
factory: _$ProductFormRoute._fromState,
|
|
),
|
|
GoRouteData.$route(
|
|
path: 'ProductListPage',
|
|
|
|
factory: _$ProductListRoute._fromState,
|
|
),
|
|
GoRouteData.$route(path: 'ProfilePage', factory: _$ProfileRoute._fromState),
|
|
GoRouteData.$route(
|
|
path: 'ReceptionPage',
|
|
|
|
factory: _$ReceptionRoute._fromState,
|
|
),
|
|
GoRouteData.$route(
|
|
path: 'DeliveryPage',
|
|
|
|
factory: _$DeliveryRoute._fromState,
|
|
),
|
|
GoRouteData.$route(
|
|
path: 'InventoryPage',
|
|
|
|
factory: _$InventoryRoute._fromState,
|
|
),
|
|
GoRouteData.$route(
|
|
path: 'ReceptionDetailsPage',
|
|
|
|
factory: _$ReceptionDetailsRoute._fromState,
|
|
),
|
|
GoRouteData.$route(
|
|
path: 'ReceptionScanPage',
|
|
|
|
factory: _$ReceptionScanRoute._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 _$ProductFormRoute on GoRouteData {
|
|
static ProductFormRoute _fromState(GoRouterState state) =>
|
|
ProductFormRoute(id: int.parse(state.uri.queryParameters['id']!)!);
|
|
|
|
ProductFormRoute get _self => this as ProductFormRoute;
|
|
|
|
@override
|
|
String get location => GoRouteData.$location(
|
|
'/SecurePage/ProductFormPage',
|
|
queryParams: {'id': _self.id.toString()},
|
|
);
|
|
|
|
@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);
|
|
}
|
|
|
|
mixin _$ProfileRoute on GoRouteData {
|
|
static ProfileRoute _fromState(GoRouterState state) => const ProfileRoute();
|
|
|
|
@override
|
|
String get location => GoRouteData.$location('/SecurePage/ProfilePage');
|
|
|
|
@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 _$ReceptionRoute on GoRouteData {
|
|
static ReceptionRoute _fromState(GoRouterState state) =>
|
|
const ReceptionRoute();
|
|
|
|
@override
|
|
String get location => GoRouteData.$location('/SecurePage/ReceptionPage');
|
|
|
|
@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 _$DeliveryRoute on GoRouteData {
|
|
static DeliveryRoute _fromState(GoRouterState state) => const DeliveryRoute();
|
|
|
|
@override
|
|
String get location => GoRouteData.$location('/SecurePage/DeliveryPage');
|
|
|
|
@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 _$InventoryRoute on GoRouteData {
|
|
static InventoryRoute _fromState(GoRouterState state) =>
|
|
const InventoryRoute();
|
|
|
|
@override
|
|
String get location => GoRouteData.$location('/SecurePage/InventoryPage');
|
|
|
|
@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 _$ReceptionDetailsRoute on GoRouteData {
|
|
static ReceptionDetailsRoute _fromState(GoRouterState state) =>
|
|
ReceptionDetailsRoute(
|
|
receptionId: int.parse(state.uri.queryParameters['reception-id']!)!,
|
|
);
|
|
|
|
ReceptionDetailsRoute get _self => this as ReceptionDetailsRoute;
|
|
|
|
@override
|
|
String get location => GoRouteData.$location(
|
|
'/SecurePage/ReceptionDetailsPage',
|
|
queryParams: {'reception-id': _self.receptionId.toString()},
|
|
);
|
|
|
|
@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 _$ReceptionScanRoute on GoRouteData {
|
|
static ReceptionScanRoute _fromState(GoRouterState state) =>
|
|
ReceptionScanRoute(
|
|
receptionId: int.parse(state.uri.queryParameters['reception-id']!)!,
|
|
);
|
|
|
|
ReceptionScanRoute get _self => this as ReceptionScanRoute;
|
|
|
|
@override
|
|
String get location => GoRouteData.$location(
|
|
'/SecurePage/ReceptionScanPage',
|
|
queryParams: {'reception-id': _self.receptionId.toString()},
|
|
);
|
|
|
|
@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);
|
|
}
|