import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:shia_game_flutter/common_ui/theme/my_theme.dart'; import 'package:shia_game_flutter/common_ui/theme/theme_service.dart'; import 'package:shia_game_flutter/core/auth_storage/auth_storage.dart'; import 'package:shia_game_flutter/core/routers/my_routes.dart'; import 'package:get/get.dart'; import 'package:get_storage/get_storage.dart'; import 'package:shia_game_flutter/init_bindings.dart'; import 'package:shia_game_flutter/l10n/app_localizations.dart'; Future main() async { WidgetsFlutterBinding.ensureInitialized(); await Future.wait([ GetStorage.init(), ]); AuthStorage.loadData(); runApp(const MainApp()); } class MainApp extends StatelessWidget { const MainApp({super.key}); @override Widget build(BuildContext context) { return GetMaterialApp( theme: MyTheme.light, darkTheme: MyTheme.dark, themeMode: ThemeService.getTheme(), locale: const Locale('en', 'US'), fallbackLocale: const Locale('en', 'US'), supportedLocales: const [Locale('en', 'US')], getPages: appPages, initialRoute: Routes.battleLeaguePage, localizationsDelegates: const [ AppLocalizations.delegate, GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, GlobalCupertinoLocalizations.delegate, ], initialBinding: BindingsBuilder(initBindings), ); } }