|
|
|
|
@ -14,6 +14,8 @@ import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:firebase_core/firebase_core.dart';
|
|
|
|
|
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
|
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
@ -27,6 +29,16 @@ import 'pages/pharmacies/compare-list.dart';
|
|
|
|
|
void main() async {
|
|
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
|
await Firebase.initializeApp();
|
|
|
|
|
|
|
|
|
|
// Pass all uncaught "fatal" errors from the framework to Crashlytics
|
|
|
|
|
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
|
|
|
|
|
|
|
|
|
|
// Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics
|
|
|
|
|
PlatformDispatcher.instance.onError = (error, stack) {
|
|
|
|
|
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
|
|
|
|
|
return true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
setupLocator();
|
|
|
|
|
HttpOverrides.global = MyHttpOverrides();
|
|
|
|
|
runApp(MyApp());
|
|
|
|
|
|