import 'package:barcode_scanner/components/components.dart'; import 'package:barcode_scanner/pages/operation/reception/reception_page_model.dart'; import 'package:barcode_scanner/themes/app_theme.dart'; import 'package:flutter/scheduler.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter/material.dart'; class ReceptionPage extends ConsumerStatefulWidget { const ReceptionPage({super.key}); @override ConsumerState createState() => _ReceptionPageState(); } class _ReceptionPageState extends ConsumerState { final globalKey = GlobalKey(); @override void initState() { super.initState(); SchedulerBinding.instance.addPostFrameCallback((_) { ref.read(receptionPageModelProvider.notifier).getUserConnected(); }); } @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppTheme.of(context).primaryBackground, key: globalKey, drawer: DrawerComponent(isOperationExpanded: true), appBar: MainAppbarComponent( scaffoledKey: globalKey, title: "Réceptions", 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), ), ), ), ], ), ), ); } }