mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 04:32:32 +00:00
* (platform): Add basic build support forr native MacOS * registered in blackbox: macos/GoogleService-Info.plist * (git): Updated .gitignore * (flutter): Remove local reference packages
19 lines
736 B
Dart
19 lines
736 B
Dart
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:lunasea/core.dart';
|
|
|
|
class LunaFirebaseCrashlytics {
|
|
/// Returns an instance of [FirebaseCrashlytics].
|
|
///
|
|
/// Throws an error if [LunaFirebase.initialize] has not been called.
|
|
static FirebaseCrashlytics get instance => FirebaseCrashlytics.instance;
|
|
|
|
/// Set the enabled state of Firebase Crashlytics.
|
|
///
|
|
/// If `enabled` is set to false, force-disables Analytics.
|
|
void setEnabledState({ bool enabled = true }) {
|
|
bool state = kReleaseMode && LunaDatabaseValue.ENABLE_FIREBASE_CRASHLYTICS.data;
|
|
instance.setCrashlyticsCollectionEnabled(state && enabled);
|
|
}
|
|
}
|