Compare commits

..

No commits in common. "84675fb1a05bb07cade446b5a9017a7b168c25ab" and "21c8d2d92478c5a583f8655727739f6882cd877d" have entirely different histories.

4 changed files with 39 additions and 47 deletions

View File

@ -34,10 +34,6 @@ class _MainLayoutState extends State<MainLayout> {
return 1; return 1;
case '/categories': case '/categories':
return 2; return 2;
case '/menu':
return 3;
case '/cart':
return 4;
default: default:
return 0; return 0;
} }
@ -54,17 +50,11 @@ class _MainLayoutState extends State<MainLayout> {
route = '/tables'; route = '/tables';
break; break;
case 1: case 1:
route = '/commandes'; route = '/commandes'; // ou '/orders' selon votre configuration
break; break;
case 2: case 2:
route = '/categories'; route = '/categories';
break; break;
case 3:
route = '/menu';
break;
case 4:
route = '/cart';
break;
default: default:
route = '/tables'; route = '/tables';
} }
@ -91,13 +81,14 @@ class _MainLayoutState extends State<MainLayout> {
], ],
), ),
// Show mobile navigation on smaller screens // Show mobile navigation on smaller screens
bottomNavigationBar: isDesktop bottomNavigationBar:
? null isDesktop
: MobileBottomNavigation( ? null
currentRoute: widget.currentRoute ?? '/tables', : MobileBottomNavigation(
selectedIndex: _selectedIndex, currentRoute: widget.currentRoute ?? '/tables',
onItemTapped: _onItemTapped, selectedIndex: _selectedIndex,
), onItemTapped: _onItemTapped,
),
); );
} }
} }

View File

@ -4,6 +4,7 @@ import 'pages/tables.dart';
import 'pages/categorie.dart'; // Import de votre page de catégories import 'pages/categorie.dart'; // Import de votre page de catégories
import 'pages/commandes_screen.dart'; import 'pages/commandes_screen.dart';
import 'pages/login_screen.dart'; import 'pages/login_screen.dart';
// import 'pages/menus_screen.dart';
void main() { void main() {
runApp(const MyApp()); runApp(const MyApp());
@ -16,7 +17,6 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MaterialApp( return MaterialApp(
title: 'Restaurant App', title: 'Restaurant App',
debugShowCheckedModeBanner: false, // ICI pour enlever le "DEBUG"
theme: ThemeData( theme: ThemeData(
primarySwatch: Colors.green, primarySwatch: Colors.green,
visualDensity: VisualDensity.adaptivePlatformDensity, visualDensity: VisualDensity.adaptivePlatformDensity,
@ -24,18 +24,30 @@ class MyApp extends StatelessWidget {
initialRoute: '/login', initialRoute: '/login',
routes: { routes: {
'/login': (context) => const LoginScreen(), '/login': (context) => const LoginScreen(),
'/tables': (context) => const MainLayout( '/tables':
(context) => const MainLayout(
currentRoute: '/tables', currentRoute: '/tables',
child: TablesScreen(), child: TablesScreen(),
), ),
'/categories': (context) => const MainLayout( '/categories':
(context) => const MainLayout(
currentRoute: '/categories', currentRoute: '/categories',
child: CategoriesPage(), child: CategoriesPage(),
), ),
'/commandes': (context) => const MainLayout( '/commandes':
(context) => const MainLayout(
currentRoute: '/commandes', currentRoute: '/commandes',
child: OrdersManagementScreen(), child: OrdersManagementScreen(),
), ),
// Uncomment and update these as needed:
// '/commandes': (context) => const MainLayout(
// currentRoute: '/commandes',
// child: CommandesScreen(),
// ),
// '/menus': (context) => const MainLayout(
// currentRoute: '/menus',
// child: MenusScreen(),
// ),
}, },
); );
} }

View File

@ -117,29 +117,18 @@ class _LoginScreenState extends State<LoginScreen> {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
// Logo personnalisé // Logo - Chef hat icon in green circle
Container( Container(
width: 80, width: 64,
height: 80, height: 64,
child: Image.asset( decoration: const BoxDecoration(
'assets/logo_transparent.png', color: Colors.green,
fit: BoxFit.contain, shape: BoxShape.circle,
errorBuilder: (context, error, stackTrace) { ),
// Fallback en cas d'erreur de chargement child: const Icon(
return Container( Icons.restaurant_menu,
width: 64, color: Colors.white,
height: 64, size: 32,
decoration: const BoxDecoration(
color: Colors.green,
shape: BoxShape.circle,
),
child: const Icon(
Icons.restaurant_menu,
color: Colors.white,
size: 32,
),
);
},
), ),
), ),
const SizedBox(height: 24), const SizedBox(height: 24),
@ -432,4 +421,4 @@ class HomeScreen extends StatelessWidget {
), ),
); );
} }
} }

View File

@ -33,5 +33,5 @@ flutter:
uses-material-design: true uses-material-design: true
# Décommente ceci si tu veux ajouter des images par exemple : # Décommente ceci si tu veux ajouter des images par exemple :
assets: # assets:
- assets/logo_transparent.png # - assets/images/