Added comments

This commit is contained in:
2025-08-19 19:18:31 +02:00
parent 2cc7253626
commit af92aa621a
23 changed files with 163 additions and 31 deletions

View File

@@ -9,8 +9,11 @@ import 'package:flutter/services.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
// Ensure the app runs in portrait mode only
await SystemChrome.setPreferredOrientations(
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);
// Initialize services
await ConfigService.initConfig();
await VersionService.init();
runApp(const App());
@@ -38,6 +41,9 @@ class _AppState extends State<App> with WidgetsBindingObserver {
}
@override
/// Every time the app goes into the background or is closed,
/// save the current game sessions to local storage.
void didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.paused ||
state == AppLifecycleState.detached) {