ignore silent FlutterError

This commit is contained in:
Vadim 2024-01-27 22:03:00 +01:00
parent 6498051983
commit 9223afe404

View file

@ -10,7 +10,10 @@ class LightmeterAnalytics {
const LightmeterAnalytics({required ILightmeterAnalyticsApi api}) : _api = api;
void init() {
FlutterError.onError = (details) => logCrash(details.exception, details.stack);
FlutterError.onError = (details) {
if (details.silent) return;
logCrash(details.exception, details.stack);
};
PlatformDispatcher.instance.onError = (error, stack) {
logCrash(error, stack);
return true;