You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.5 KiB
53 lines
1.5 KiB
import 'package:flutter/material.dart';
|
|
import 'layouts/main_layout.dart';
|
|
import 'pages/tables.dart';
|
|
import 'pages/categorie.dart';
|
|
import 'pages/commandes_screen.dart';
|
|
import 'pages/login_screen.dart';
|
|
import 'pages/menus_screen.dart';
|
|
|
|
void main() {
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'Restaurant App',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: ThemeData(
|
|
primarySwatch: Colors.green,
|
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
|
),
|
|
initialRoute: '/login',
|
|
routes: {
|
|
'/login': (context) => const LoginScreen(),
|
|
'/tables':
|
|
(context) => const MainLayout(
|
|
currentRoute: '/tables',
|
|
child: TablesScreen(),
|
|
),
|
|
'/categories':
|
|
(context) => const MainLayout(
|
|
currentRoute: '/categories',
|
|
child: CategoriesPage(),
|
|
),
|
|
'/commandes':
|
|
(context) => const MainLayout(
|
|
currentRoute: '/commandes',
|
|
child: OrdersManagementScreen(),
|
|
),
|
|
// MODIFICATION : Route simple pour le menu
|
|
'/plats':
|
|
(context) => const MainLayout(
|
|
currentRoute: '/plats',
|
|
child:
|
|
PlatsManagementScreen(), // Pas de paramètres requis maintenant
|
|
),
|
|
},
|
|
);
|
|
}
|
|
}
|
|
|