Firestore class

The Cloud Firestore service interface.

See: firebase.google.com/docs/reference/js/firebase.firestore.Firestore.

Properties

app App
Non-null App for this instance of firestore service.
no setter
hashCode int
The hash code for this object.
no setterinherited
jsObject → FirestoreJsImpl
JS object.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

batch() WriteBatch
Creates a write batch, used for performing multiple writes as a single atomic operation.
collection(String collectionPath) CollectionReference
Gets a CollectionReference instance that refers to the collection at the specified path. The collectionPath parameter is a slash-separated path to a collection.
collectionGroup(String collectionId) Query<QueryJsImpl>
Creates and returns a new Query that includes all documents in the database that are contained in a collection or subcollection with the given collectionId.
disableNetwork() Future
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) DocumentReference
Gets a DocumentReference instance that refers to the document at the specified path. The documentPath parameter is a slash-separated path to a document.
enableNetwork() Future
Re-enables use of the network for this Firestore instance after a prior call to disableNetwork.
enablePersistence([PersistenceSettings? settings]) Future<void>
Attempts to enable persistent storage, if possible.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runTransaction(dynamic updateFunction(Transaction)) Future
Executes the given updateFunction and then attempts to commit the changes applied within the transaction. If any document read within the transaction has changed, Cloud Firestore retries the updateFunction. If it fails to commit after 5 attempts, the transaction fails.
settings(Settings settings) → void
Specifies custom settings to be used to configure the Firestore instance. Must be set before invoking any other methods.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

getInstance(FirestoreJsImpl jsObject) Firestore
Creates a new Firestore from a jsObject.