commit main
This commit is contained in:
parent
eea0be9934
commit
79d208b69e
@ -38,27 +38,10 @@ class MyApp extends StatelessWidget {
|
||||
child: OrdersManagementScreen(),
|
||||
),
|
||||
// MODIFICATION : Route simple pour le menu
|
||||
'/menu': (context) => const MainLayout(
|
||||
currentRoute: '/menu',
|
||||
child: MenuPage(), // Pas de paramètres requis maintenant
|
||||
),
|
||||
},
|
||||
// onGenerateRoute pour gérer les paramètres optionnels
|
||||
onGenerateRoute: (settings) {
|
||||
if (settings.name == '/menu-with-table') {
|
||||
final args = settings.arguments as Map<String, dynamic>?;
|
||||
|
||||
return MaterialPageRoute(
|
||||
builder: (context) => MainLayout(
|
||||
currentRoute: '/menu',
|
||||
child: MenuPage(
|
||||
tableId: args?['tableId'] ?? 0,
|
||||
personne: args?['personne'] ?? 1,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
// '/menu': (context) => const MainLayout(
|
||||
// currentRoute: '/menu',
|
||||
// child: MenuPage(), // Pas de paramètres requis maintenant
|
||||
// ),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user