|
|
|
|
@ -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());
|
|
|
|
|
@ -55,8 +67,6 @@ class _MyApp extends State<MyApp> {
|
|
|
|
|
//0567184134 mobile
|
|
|
|
|
//246305493
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// checkForUpdate() {
|
|
|
|
|
// // todo need to verify 'imp'
|
|
|
|
|
// InAppUpdate.checkForUpdate().then((info) {
|
|
|
|
|
@ -140,14 +150,12 @@ class _MyApp extends State<MyApp> {
|
|
|
|
|
],
|
|
|
|
|
child: Consumer<ProjectViewModel>(
|
|
|
|
|
builder: (context, projectProvider, child) => MaterialApp(
|
|
|
|
|
|
|
|
|
|
builder: (_, mchild) {
|
|
|
|
|
return MediaQuery(
|
|
|
|
|
data: MediaQuery.of(context).copyWith(
|
|
|
|
|
textScaler: TextScaler.linear(1.0),
|
|
|
|
|
), //set desired text scale factor here
|
|
|
|
|
child: mchild!
|
|
|
|
|
);
|
|
|
|
|
data: MediaQuery.of(context).copyWith(
|
|
|
|
|
textScaler: TextScaler.linear(1.0),
|
|
|
|
|
), //set desired text scale factor here
|
|
|
|
|
child: mchild!);
|
|
|
|
|
// Container(
|
|
|
|
|
// color: Colors.blue,
|
|
|
|
|
// ));
|
|
|
|
|
|