From 9223afe4049e691c86736fa942a8abd35a695754 Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Sat, 27 Jan 2024 22:03:00 +0100 Subject: [PATCH] ignore silent `FlutterError` --- lib/data/analytics/analytics.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/data/analytics/analytics.dart b/lib/data/analytics/analytics.dart index b666b1a..e39f965 100644 --- a/lib/data/analytics/analytics.dart +++ b/lib/data/analytics/analytics.dart @@ -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;