mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
15 lines
548 B
Dart
15 lines
548 B
Dart
|
import 'package:firebase_core/firebase_core.dart';
|
||
|
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
|
||
|
import 'package:flutter/foundation.dart';
|
||
|
|
||
|
import 'firebase_options.dart';
|
||
|
|
||
|
Future<void> initializeFirebase() async {
|
||
|
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
||
|
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
|
||
|
PlatformDispatcher.instance.onError = (error, stack) {
|
||
|
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
|
||
|
return true;
|
||
|
};
|
||
|
}
|