From 3247f2a0e9e91c2cecfde978ce4492b26deac689 Mon Sep 17 00:00:00 2001 From: Eldar2021 Date: Sun, 11 Aug 2024 23:05:37 +0600 Subject: [PATCH] Fix MqCrashlytics setCrashlyticsCollectionEnabled --- app/lib/core/crashlytics/mq_crashlytics.dart | 1 - app/lib/main.dart | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/lib/core/crashlytics/mq_crashlytics.dart b/app/lib/core/crashlytics/mq_crashlytics.dart index fae27a29..fc58dc60 100644 --- a/app/lib/core/crashlytics/mq_crashlytics.dart +++ b/app/lib/core/crashlytics/mq_crashlytics.dart @@ -47,7 +47,6 @@ final class MqCrashlytics { } static Future setCrashlyticsCollectionEnabled({required bool enabled}) async { - if (kDebugMode) return; return crashlytics.setCrashlyticsCollectionEnabled(enabled); } diff --git a/app/lib/main.dart b/app/lib/main.dart index fffb0dff..2e75f606 100644 --- a/app/lib/main.dart +++ b/app/lib/main.dart @@ -27,7 +27,7 @@ Future main({AppConfig? appConfig}) async { await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ); - await FirebaseAnalytics.instance.setAnalyticsCollectionEnabled(true); + await FirebaseAnalytics.instance.setAnalyticsCollectionEnabled(!kDebugMode); await MqCrashlytics.setCrashlyticsCollectionEnabled(enabled: !kDebugMode);