mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-26 09:20:45 +00:00
ignore silent FlutterError
This commit is contained in:
parent
6498051983
commit
9223afe404
1 changed files with 4 additions and 1 deletions
|
@ -10,7 +10,10 @@ class LightmeterAnalytics {
|
||||||
const LightmeterAnalytics({required ILightmeterAnalyticsApi api}) : _api = api;
|
const LightmeterAnalytics({required ILightmeterAnalyticsApi api}) : _api = api;
|
||||||
|
|
||||||
void init() {
|
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) {
|
PlatformDispatcher.instance.onError = (error, stack) {
|
||||||
logCrash(error, stack);
|
logCrash(error, stack);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue