FirebaseDatabase class

The entry point for accessing a Firebase Database. You can get an instance by calling FirebaseDatabase.instance. To access a location in the database and read or write data, use reference().


FirebaseDatabase({FirebaseApp app, String databaseURL })
Gets an instance of FirebaseDatabase. [...]


app FirebaseApp
The FirebaseApp instance to which this FirebaseDatabase belongs. [...]
databaseURL → String
The URL to which this FirebaseDatabase belongs [...]
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited


goOffline() → Future<void>
Shuts down our connection to the Firebase Database backend until goOnline is called.
goOnline() → Future<void>
Resumes our connection to the Firebase Database backend after a previous goOffline call.
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. [...]
reference() DatabaseReference
Gets a DatabaseReference for the root of your Firebase Database.
setPersistenceCacheSizeBytes(int cacheSize) → Future<bool>
Attempts to set the size of the persistence cache. [...]
setPersistenceEnabled(bool enabled) → Future<bool>
Attempts to sets the database persistence to enabled. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toString() → String
Returns a string representation of this object.


operator ==(dynamic other) → bool
The equality operator.

Static Properties

instance FirebaseDatabase
Gets the instance of FirebaseDatabase for the default Firebase app.