
Introduces dedicated pages and routes for Delivery and Inventory operations. Refactors the application drawer to include navigation links for these new operations, ensuring proper route transitions and closing the drawer on tap. Enhances the drawer's active state styling for list and expansion tiles, providing better visual feedback. Extracts common app bar logic into a reusable `MainAppbarComponent` and integrates it into operation pages, starting with Reception, to standardize the application's header. Standardizes routing paths for operation pages and ensures consistent page transitions across them.
60 lines
1.8 KiB
Dart
60 lines
1.8 KiB
Dart
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:barcode_scanner/components/components.dart';
|
|
import 'package:barcode_scanner/themes/app_theme.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class DeliveryPage extends ConsumerStatefulWidget {
|
|
const DeliveryPage({super.key});
|
|
|
|
@override
|
|
ConsumerState<DeliveryPage> createState() => _DeliveryPageState();
|
|
}
|
|
|
|
class _DeliveryPageState extends ConsumerState<DeliveryPage> {
|
|
final globalKey = GlobalKey<ScaffoldState>();
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: AppTheme.of(context).primaryBackground,
|
|
key: globalKey,
|
|
drawer: DrawerComponent(
|
|
isOperationExpanded: true,
|
|
selectedState: SelectedDrawerState(menuIndex: 0, subMenuIndex: 1),
|
|
),
|
|
appBar: MainAppbarComponent(
|
|
scaffoledKey: globalKey,
|
|
title: "Livraisons",
|
|
subTitle: "Opérations d'Entrepôt",
|
|
),
|
|
body: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
child: ListView(
|
|
children: [
|
|
const SizedBox(height: 16),
|
|
QuickActionComponent(),
|
|
const SizedBox(height: 16),
|
|
Card(
|
|
color: AppTheme.of(context).secondaryBackground,
|
|
elevation: 0,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(10),
|
|
side: BorderSide(color: AppTheme.of(context).alternate),
|
|
),
|
|
child: Padding(
|
|
padding: EdgeInsets.all(16),
|
|
child: Text(
|
|
'Activité Récente',
|
|
style: AppTheme.of(
|
|
context,
|
|
).bodyMedium.copyWith(fontWeight: FontWeight.bold),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|