This repository has been archived on 2025-08-25. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Seshat/lib/main.dart
2025-08-05 10:32:18 +02:00

81 lines
2.6 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';
// TODO: In router, make it so that the navbar is integrated in everyscreen that needs it -> consistancy (should be at least, hope so) so it stops jumping. Then, make it so that the pages are children of scaffold. That's all ?
void main() {
Logger.root.level = Level.ALL;
// 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());
}
}
// 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"),
// },
// ),
// );
// }
// }