FirebaseFirestorePlatform class

Defines an interface to work with Cloud Firestore on web and mobile



FirebaseFirestorePlatform({FirebaseApp appInstance})
Create an instance using app
FirebaseFirestorePlatform.instanceFor({FirebaseApp app})
Create an instance using app using the existing implementation


app FirebaseApp
Returns the FirebaseApp for the current instance.
appInstance FirebaseApp
The FirebaseApp this instance was initialized with.
@protected, final
hashCode int
The hash code for this object. [...]
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
settings Settings
Get the current Settings for this FirebaseFirestorePlatform instance.
read / write


batch() WriteBatchPlatform
Creates a write batch, used for performing multiple writes as a single atomic operation. [...]
clearPersistence() Future<void>
Clears any persisted data for the current instance.
collection(String collectionPath) CollectionReferencePlatform
Gets a CollectionReferencePlatform for the specified Firestore path.
collectionGroup(String collectionPath) QueryPlatform
Gets a QueryPlatform for the specified collection group.
delegateFor({FirebaseApp app}) FirebaseFirestorePlatform
Enables delegates to create new instances of themselves if a none default FirebaseApp instance is required by the user.
disableNetwork() Future<void>
Disables network usage for this instance. It can be re-enabled via enableNetwork(). While the network is disabled, any snapshot listeners or get() calls will return results from cache, and any write operations will be queued until the network is restored.
doc(String documentPath) DocumentReferencePlatform
Gets a DocumentReferencePlatform for the specified Firestore path.
enableNetwork() Future<void>
Re-enables use of the network for this Firestore instance after a prior call to disableNetwork().
enablePersistence([PersistenceSettings persistenceSettings]) Future<void>
Enable persistence of Firestore data. Web only.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
runTransaction<T>(TransactionHandler<T> transactionHandler, {Duration timeout = const Duration(seconds: 30)}) Future<T>
Executes the given TransactionHandler and then attempts to commit the changes applied within an atomic transaction. [...]
snapshotsInSync() Stream<void>
Returns a Steam which is called each time all of the active listeners have been synchronised.
terminate() Future<void>
Terminates this FirebaseFirestorePlatform instance. [...]
toString() String
Returns a string representation of this object.
waitForPendingWrites() Future<void>
Waits until all currently pending writes for the active user have been acknowledged by the backend. [...]


operator ==(dynamic o) bool
The equality operator. [...]

Static Properties

instance FirebaseFirestorePlatform
The current default FirebaseFirestorePlatform instance. [...]
read / write