Reputation: 51
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.
Upvotes: 5
Views: 1977
Reputation: 34210
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);
Upvotes: 12