Compare commits
2 Commits
21c8d2d924
...
84675fb1a0
| Author | SHA1 | Date | |
|---|---|---|---|
| 84675fb1a0 | |||
| a4274b9425 |
@ -34,6 +34,10 @@ 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;
|
||||||
}
|
}
|
||||||
@ -50,11 +54,17 @@ class _MainLayoutState extends State<MainLayout> {
|
|||||||
route = '/tables';
|
route = '/tables';
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
route = '/commandes'; // ou '/orders' selon votre configuration
|
route = '/commandes';
|
||||||
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';
|
||||||
}
|
}
|
||||||
@ -81,14 +91,13 @@ class _MainLayoutState extends State<MainLayout> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
// Show mobile navigation on smaller screens
|
// Show mobile navigation on smaller screens
|
||||||
bottomNavigationBar:
|
bottomNavigationBar: isDesktop
|
||||||
isDesktop
|
? null
|
||||||
? null
|
: MobileBottomNavigation(
|
||||||
: MobileBottomNavigation(
|
currentRoute: widget.currentRoute ?? '/tables',
|
||||||
currentRoute: widget.currentRoute ?? '/tables',
|
selectedIndex: _selectedIndex,
|
||||||
selectedIndex: _selectedIndex,
|
onItemTapped: _onItemTapped,
|
||||||
onItemTapped: _onItemTapped,
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4,7 +4,6 @@ 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());
|
||||||
@ -17,6 +16,7 @@ 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,30 +24,18 @@ class MyApp extends StatelessWidget {
|
|||||||
initialRoute: '/login',
|
initialRoute: '/login',
|
||||||
routes: {
|
routes: {
|
||||||
'/login': (context) => const LoginScreen(),
|
'/login': (context) => const LoginScreen(),
|
||||||
'/tables':
|
'/tables': (context) => const MainLayout(
|
||||||
(context) => const MainLayout(
|
|
||||||
currentRoute: '/tables',
|
currentRoute: '/tables',
|
||||||
child: TablesScreen(),
|
child: TablesScreen(),
|
||||||
),
|
),
|
||||||
'/categories':
|
'/categories': (context) => const MainLayout(
|
||||||
(context) => const MainLayout(
|
|
||||||
currentRoute: '/categories',
|
currentRoute: '/categories',
|
||||||
child: CategoriesPage(),
|
child: CategoriesPage(),
|
||||||
),
|
),
|
||||||
'/commandes':
|
'/commandes': (context) => const MainLayout(
|
||||||
(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(),
|
|
||||||
// ),
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -117,18 +117,29 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
// Logo - Chef hat icon in green circle
|
// Logo personnalisé
|
||||||
Container(
|
Container(
|
||||||
width: 64,
|
width: 80,
|
||||||
height: 64,
|
height: 80,
|
||||||
decoration: const BoxDecoration(
|
child: Image.asset(
|
||||||
color: Colors.green,
|
'assets/logo_transparent.png',
|
||||||
shape: BoxShape.circle,
|
fit: BoxFit.contain,
|
||||||
),
|
errorBuilder: (context, error, stackTrace) {
|
||||||
child: const Icon(
|
// Fallback en cas d'erreur de chargement
|
||||||
Icons.restaurant_menu,
|
return Container(
|
||||||
color: Colors.white,
|
width: 64,
|
||||||
size: 32,
|
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),
|
const SizedBox(height: 24),
|
||||||
@ -421,4 +432,4 @@ class HomeScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -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/images/
|
- assets/logo_transparent.png
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user