When I started using Firebase I remember it had something like:
if (kDebugMode) turnOffFirebase();
but I don't find anywhere what is the actual code.
When I started using Firebase I remember it had something like:
if (kDebugMode) turnOffFirebase();
but I don't find anywhere what is the actual code.
kDebugMode is the constant, which added inside foundation lib which tells whether the app is running on debug mode or not.
import 'package:flutter/foundation.dart';
FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(!kDebugMode);
FirebaseAnalytics().setAnalyticsCollectionEnabled(!kDebugMode);