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.
 
 
 
 
 
 

76 lines
2.2 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';
import 'pages/historique_commande.dart';
import 'pages/information.dart';
import 'pages/printer_page.dart';
import 'pages/encaissement_screen.dart'; // NOUVEAU
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(),
),
'/plats':
(context) => const MainLayout(
currentRoute: '/plats',
child: PlatsManagementScreen(),
),
// NOUVELLE ROUTE pour l'encaissement
'/encaissement':
(context) => const MainLayout(
currentRoute: '/encaissement',
child: EncaissementScreen(),
),
'/historique':
(context) => MainLayout(
currentRoute: '/historique',
child: OrderHistoryPage(),
),
'/information':
(context) => MainLayout(
currentRoute: '/information',
child: PrintTemplateManagementScreen(),
),
'/Setting':
(context) => MainLayout(
currentRoute: '/Setting',
child: PrinterPage(),
),
},
);
}
}