FirebaseService class

Unified service for Firebase Analytics and Crashlytics.

Exposes nullable getters that return real instances when useFirebase is true, or null when disabled. Callers use null-aware access:

firebase.analytics?.logAppOpen();
firebase.crashlytics?.recordError(e, stack);

Constructors

FirebaseService()
const

Properties

analytics FirebaseAnalytics?
The FirebaseAnalytics instance, or null if Firebase is disabled.
no setter
analyticsObserver FirebaseAnalyticsObserver?
Returns a FirebaseAnalyticsObserver for use with navigation observers, or null if Firebase is disabled.
no setter
crashlytics FirebaseCrashlytics?
The FirebaseCrashlytics instance, or null if Firebase is disabled.
no setter
hashCode int
The hash code for this object.
no setterinherited
onConfigUpdated Stream<void>
A stream that emits whenever the Remote Config is updated and activated.
no setter
remoteConfig FirebaseRemoteConfig?
The FirebaseRemoteConfig instance, or null if Firebase is disabled.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fetch() Future<void>
Forces a fresh fetch and activation of Remote Config.
getRemoteConfigString(String key) → ({bool isRemote, String value})
Retrieves a summary of a Remote Config string value.
init({Map<String, dynamic>? defaults}) Future<void>
Initializes Firebase Remote Config.
log(String message) → void
Logs a custom message to Firebase Crashlytics if enabled.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordNonFatal(String message) → void
Records a non-fatal error to Firebase Crashlytics if enabled.
setDefaults(Map<String, dynamic> defaults) Future<void>
Updates the in-app default values for Remote Config.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited