Fix 2799
This commit is contained in:
@ -9,6 +9,13 @@ import 'package:rogapp/utils/string_values.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
// import 'package:is_lock_screen/is_lock_screen.dart';
|
||||
|
||||
import 'package:rogapp/services/device_info_service.dart';
|
||||
import 'package:rogapp/services/error_service.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'dart:async';
|
||||
|
||||
Map<String, dynamic> deviceInfo = {};
|
||||
|
||||
void saveGameState() async {
|
||||
DestinationController destinationController =
|
||||
Get.find<DestinationController>();
|
||||
@ -35,8 +42,8 @@ void restoreGame() async {
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
await FlutterMapTileCaching.initialise();
|
||||
|
||||
final StoreDirectory instanceA = FMTC.instance('OpenStreetMap (A)');
|
||||
await instanceA.manage.createAsync();
|
||||
await instanceA.metadata.addAsync(
|
||||
@ -51,7 +58,21 @@ void main() async {
|
||||
key: 'behaviour',
|
||||
value: 'cacheFirst',
|
||||
);
|
||||
runApp(const MyApp());
|
||||
|
||||
deviceInfo = await DeviceInfoService.getDeviceInfo();
|
||||
|
||||
FlutterError.onError = (FlutterErrorDetails details) {
|
||||
FlutterError.presentError(details);
|
||||
ErrorService.reportError(details.exception, details.stack ?? StackTrace.current, deviceInfo);
|
||||
};
|
||||
|
||||
runZonedGuarded(() {
|
||||
runApp(const ProviderScope(child: MyApp()));
|
||||
}, (error, stackTrace) {
|
||||
ErrorService.reportError(error, stackTrace, deviceInfo);
|
||||
});
|
||||
|
||||
//runApp(const MyApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
|
||||
Reference in New Issue
Block a user