mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-18 09:22:47 +08:00
Disable analytics in debug mode
Sadly we can only do this in Android, there doesn't seem to be a way to disable it on iOS. https://github.com/flutter/flutter/issues/21063
This commit is contained in:
@ -32,6 +32,12 @@ Future runJournalApp() async {
|
||||
var pref = await SharedPreferences.getInstance();
|
||||
var onBoardingCompleted = pref.getBool("onBoardingCompleted") ?? false;
|
||||
|
||||
if (JournalApp.isInDebugMode) {
|
||||
if (JournalApp.analytics.android != null) {
|
||||
JournalApp.analytics.android.setAnalyticsCollectionEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
runApp(new StateContainer(
|
||||
onBoardingCompleted: onBoardingCompleted,
|
||||
child: JournalApp(),
|
||||
|
Reference in New Issue
Block a user