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

View File

@ -4,6 +4,7 @@ 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());
@ -16,7 +17,6 @@ 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,18 +24,30 @@ 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(),
// ),
},
);
}

View File

@ -117,16 +117,8 @@ class _LoginScreenState extends State<LoginScreen> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
// Logo personnalisé
// Logo - Chef hat icon in green circle
Container(
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(
@ -138,9 +130,6 @@ class _LoginScreenState extends State<LoginScreen> {
color: Colors.white,
size: 32,
),
);
},
),
),
const SizedBox(height: 24),

View File

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