83 lines
2.5 KiB
Dart
83 lines
2.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:logging/logging.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:seshat/config/dependencies.dart';
|
|
import 'package:seshat/routing/router.dart';
|
|
|
|
void main() {
|
|
Logger.root.level = Level.ALL;
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
runApp(MultiProvider(providers: providers, child: const MyApp()));
|
|
// runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
// This widget is the root of your application.
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp.router(
|
|
routerConfig: router(context.read()),
|
|
theme: ThemeData.dark(),
|
|
);
|
|
}
|
|
}
|
|
|
|
// class Root extends StatefulWidget {
|
|
// const Root({super.key});
|
|
|
|
// @override
|
|
// State<Root> createState() => _RootState();
|
|
// }
|
|
|
|
// class _RootState extends State<Root> {
|
|
// var selectedIndex = 1;
|
|
// @override
|
|
// Widget build(BuildContext context) {
|
|
// final theme = Theme.of(context);
|
|
// return AnnotatedRegion(
|
|
// value: SystemUiOverlayStyle(
|
|
// statusBarBrightness: Brightness.light,
|
|
// statusBarIconBrightness: Brightness.light,
|
|
// ),
|
|
// child: Scaffold(
|
|
// appBar: null,
|
|
// bottomNavigationBar: NavigationBar(
|
|
// destinations: const <Widget>[
|
|
// NavigationDestination(icon: Icon(Icons.home), label: "Home"),
|
|
// NavigationDestination(
|
|
// icon: Icon(Icons.plus_one_outlined),
|
|
// label: "Ajout",
|
|
// ),
|
|
// NavigationDestination(icon: Icon(Icons.sell), label: "Vente"),
|
|
// ],
|
|
// selectedIndex: selectedIndex,
|
|
// onDestinationSelected: (int index) {
|
|
// setState(() {
|
|
// selectedIndex = index;
|
|
// });
|
|
// },
|
|
// indicatorColor: theme.highlightColor,
|
|
// ),
|
|
// body: switch (selectedIndex) {
|
|
// 0 => Add(title: "Home Page"),
|
|
// 1 => MultiProvider(
|
|
// providers: [
|
|
// ChangeNotifierProvider(
|
|
// create: (context) => TabScreen("scanPage"),
|
|
// ),
|
|
// ChangeNotifierProvider(
|
|
// create: (context) =>
|
|
// Owner("UEAuvergne", "unionetudianteauvergne@gmail.com"),
|
|
// ),
|
|
// ],
|
|
// child: Add(title: "Ajout"),
|
|
// ),
|
|
// _ => Add(title: "Wildcard"),
|
|
// },
|
|
// ),
|
|
// );
|
|
// }
|
|
// }
|