(Feat) Update Loading screen
This commit is contained in:
+4
-6
@@ -1,8 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'screens/home_shell.dart';
|
||||
import 'services/produit_repository.dart';
|
||||
import 'screens/demarrage_screen.dart';
|
||||
import 'theme.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
@@ -14,9 +13,8 @@ Future<void> main() async {
|
||||
DeviceOrientation.portraitDown,
|
||||
]);
|
||||
|
||||
// Connexion au serveur (Raspberry Pi) + chargement + temps réel.
|
||||
await ProduitRepository.instance.initialiser();
|
||||
|
||||
// On affiche l'interface tout de suite : la connexion au serveur se fait
|
||||
// dans DemarrageScreen, loader visible (plus d'écran blanc au lancement).
|
||||
runApp(const MonApp());
|
||||
}
|
||||
|
||||
@@ -31,7 +29,7 @@ class MonApp extends StatelessWidget {
|
||||
theme: AppTheme.clair(),
|
||||
darkTheme: AppTheme.sombre(),
|
||||
themeMode: ThemeMode.light,
|
||||
home: const HomeShell(),
|
||||
home: const DemarrageScreen(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user