diff --git a/lib/layouts/main_layout.dart b/lib/layouts/main_layout.dart index 5d8664a..8bfaa6c 100644 --- a/lib/layouts/main_layout.dart +++ b/lib/layouts/main_layout.dart @@ -34,6 +34,10 @@ class _MainLayoutState extends State { return 1; case '/categories': return 2; + case '/menu': + return 3; + case '/cart': + return 4; default: return 0; } @@ -50,11 +54,17 @@ class _MainLayoutState extends State { route = '/tables'; break; case 1: - route = '/commandes'; // ou '/orders' selon votre configuration + route = '/commandes'; break; case 2: route = '/categories'; break; + case 3: + route = '/menu'; + break; + case 4: + route = '/cart'; + break; default: route = '/tables'; } @@ -81,14 +91,13 @@ class _MainLayoutState extends State { ], ), // Show mobile navigation on smaller screens - bottomNavigationBar: - isDesktop - ? null - : MobileBottomNavigation( - currentRoute: widget.currentRoute ?? '/tables', - selectedIndex: _selectedIndex, - onItemTapped: _onItemTapped, - ), + bottomNavigationBar: isDesktop + ? null + : MobileBottomNavigation( + currentRoute: widget.currentRoute ?? '/tables', + selectedIndex: _selectedIndex, + onItemTapped: _onItemTapped, + ), ); } } \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index b8a21f2..6ec90a2 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,7 +4,6 @@ import 'pages/tables.dart'; import 'pages/categorie.dart'; // Import de votre page de catégories import 'pages/commandes_screen.dart'; import 'pages/login_screen.dart'; -// import 'pages/menus_screen.dart'; void main() { runApp(const MyApp()); @@ -17,6 +16,7 @@ class MyApp extends StatelessWidget { Widget build(BuildContext context) { return MaterialApp( title: 'Restaurant App', + debugShowCheckedModeBanner: false, // ← ICI pour enlever le "DEBUG" theme: ThemeData( primarySwatch: Colors.green, visualDensity: VisualDensity.adaptivePlatformDensity, @@ -24,30 +24,18 @@ class MyApp extends StatelessWidget { initialRoute: '/login', routes: { '/login': (context) => const LoginScreen(), - '/tables': - (context) => const MainLayout( + '/tables': (context) => const MainLayout( currentRoute: '/tables', child: TablesScreen(), ), - '/categories': - (context) => const MainLayout( + '/categories': (context) => const MainLayout( currentRoute: '/categories', child: CategoriesPage(), ), - '/commandes': - (context) => const MainLayout( + '/commandes': (context) => const MainLayout( currentRoute: '/commandes', child: OrdersManagementScreen(), ), - // Uncomment and update these as needed: - // '/commandes': (context) => const MainLayout( - // currentRoute: '/commandes', - // child: CommandesScreen(), - // ), - // '/menus': (context) => const MainLayout( - // currentRoute: '/menus', - // child: MenusScreen(), - // ), }, ); } diff --git a/lib/pages/login_screen.dart b/lib/pages/login_screen.dart index c9100ac..c7a1c55 100644 --- a/lib/pages/login_screen.dart +++ b/lib/pages/login_screen.dart @@ -117,18 +117,29 @@ class _LoginScreenState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - // Logo - Chef hat icon in green circle + // Logo personnalisé Container( - width: 64, - height: 64, - decoration: const BoxDecoration( - color: Colors.green, - shape: BoxShape.circle, - ), - child: const Icon( - Icons.restaurant_menu, - color: Colors.white, - size: 32, + width: 80, + height: 80, + child: Image.asset( + 'assets/logo_transparent.png', + fit: BoxFit.contain, + errorBuilder: (context, error, stackTrace) { + // Fallback en cas d'erreur de chargement + return Container( + width: 64, + height: 64, + decoration: const BoxDecoration( + color: Colors.green, + shape: BoxShape.circle, + ), + child: const Icon( + Icons.restaurant_menu, + color: Colors.white, + size: 32, + ), + ); + }, ), ), const SizedBox(height: 24), @@ -421,4 +432,4 @@ class HomeScreen extends StatelessWidget { ), ); } -} +} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index ae5a60b..c37eae0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -33,5 +33,5 @@ flutter: uses-material-design: true # Décommente ceci si tu veux ajouter des images par exemple : - # assets: - # - assets/images/ + assets: + - assets/logo_transparent.png