MockFirebaseDatabase class

Implemented types
  • FirebasePluginPlatform

Constructors

MockFirebaseDatabase()

Properties

app ↔ FirebaseApp
The FirebaseApp for this current FirebaseDatabase instance.
getter/setter pairinherited
databaseURL String?
A custom Database URL for this instance.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
pluginConstants Map
Returns any plugin constants this plugin app instance has initialized.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

goOffline() Future<void>
Shuts down our connection to the Firebase Database backend until goOnline is called.
inherited
goOnline() Future<void>
Resumes our connection to the Firebase Database backend after a previous goOffline call.
inherited
noSuchMethod(Invocation invocation, {Object? returnValue, Object? returnValueForMissingStub = deferToDefaultResponse}) → dynamic
Handles method stubbing, method call verification, and real method calls.
inherited
purgeOutstandingWrites() Future<void>
The Firebase Database client automatically queues writes and sends them to the server at the earliest opportunity, depending on network connectivity. In some cases (e.g. offline usage) there may be a large number of writes waiting to be sent. Calling this method will purge all outstanding writes so they are abandoned.
inherited
ref([String? path]) → DatabaseReference
Returns a DatabaseReference representing the location in the Database corresponding to the provided path. If no path is provided, the Reference will point to the root of the Database.
override
reference() → DatabaseReference
Returns a DatabaseReference accessing the root of the database.
override
refFromURL(String url) → DatabaseReference
Returns a DatabaseReference representing the location in the Database corresponding to the provided Firebase URL.
inherited
setLoggingEnabled(bool enabled) → void
Enables verbose diagnostic logging for debugging your application. This must be called before any other usage of FirebaseDatabase instance. By default, diagnostic logging is disabled.
inherited
setPersistenceCacheSizeBytes(int cacheSize) → void
Attempts to set the size of the persistence cache.
inherited
setPersistenceEnabled(bool enabled) → void
Attempts to sets the database persistence to enabled.
inherited
toString() String
A string representation of this object.
inherited
useDatabaseEmulator(String host, int port, {bool automaticHostMapping = true}) → void
Changes this instance to point to a FirebaseDatabase emulator running locally.
inherited

Operators

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

Static Properties

instance → FirebaseDatabase
no setter
persistData → dynamic
no setter

Static Methods

setDataPersistenceEnabled({bool enabled = true}) → void