I would like to catch and report when UI exception occurs in app. I would like to report it with firebase tools or save in local activity log, but I don't know where to catch it?
I would like to catch and report when UI exception occurs in app. I would like to report it with firebase tools or save in local activity log, but I don't know where to catch it?
Crashlytics has a way of doing it. It has a way of listening to Flutter Errors and will record it on Firebase:
FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterError;
You can also replace the FirebaseCrashlytics.instance.recordFlutterError with whatever your service you want to use.
FlutterError.onError = //whatever service you use.