We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 203cb8d commit a78f508Copy full SHA for a78f508
‎lib/main.dart‎
@@ -52,6 +52,12 @@ void main() async {
52
// Pass all uncaught errors from the framework to Crashlytics.
53
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
54
55
+ // Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics
56
+ PlatformDispatcher.instance.onError = (error, stack) {
57
+ FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
58
+ return true;
59
+ };
60
+
61
// Disable analytics & crashlytics when in debug mode
62
FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(!kDebugMode);
63
FirebaseAnalytics.instance.setAnalyticsCollectionEnabled(!kDebugMode);
0 commit comments