feat : change app inspector and exception handling

This commit is contained in:
2025-07-12 17:06:29 +03:30
parent e52674de37
commit 0fc16569a6
24 changed files with 472 additions and 322 deletions

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:rasadyar_app/infrastructure/service/app_navigation_observer.dart';
import 'package:rasadyar_app/presentation/routes/app_pages.dart';
import 'package:rasadyar_auth/auth.dart';
import 'package:rasadyar_auth/data/services/token_storage_service.dart';
@@ -9,14 +10,15 @@ import 'infrastructure/service/auth_service.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await setupInjection();
await setupPreInjection();
Get.put(TokenStorageService());
var tokenService = Get.find<TokenStorageService>();
await tokenService.init();
Get.put(AuthMiddleware());
Get.put(AuthService());
runApp(MyApp());
// runApp(DevicePreview(builder: (context) => ForDevicePreview(),));
}
@@ -59,6 +61,7 @@ class MyApp extends StatelessWidget {
getPages: AppPages.pages,
locale: const Locale("fa", "IR"),
supportedLocales: const [Locale("fa", "IR")],
navigatorObservers: [CustomNavigationObserver()],
localizationsDelegates: [
PersianMaterialLocalizations.delegate,
PersianCupertinoLocalizations.delegate,