FirebaseFirestorePlatform class abstract
Defines an interface to work with Cloud Firestore on web and mobile
- Inheritance
-
- Object
- PlatformInterface
- FirebaseFirestorePlatform
Constructors
- FirebaseFirestorePlatform({FirebaseApp? appInstance})
- Create an instance using app
- FirebaseFirestorePlatform.instanceFor({required FirebaseApp app})
-
Create an instance using
app
using the existing implementationfactory
Properties
- app → FirebaseApp
-
Returns the
FirebaseApp
for the current instance.no setter - appInstance → FirebaseApp?
-
The
FirebaseApp
this instance was initialized with.final - hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settings ↔ Settings
-
Get the current Settings for this FirebaseFirestorePlatform instance.
getter/setter pair
Methods
-
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(
{required 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 nonexistent method or property is accessed.
inherited
-
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 -
A string representation of this object.
override
-
waitForPendingWrites(
) → Future< void> - Waits until all currently pending writes for the active user have been acknowledged by the backend.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Properties
- instance ↔ FirebaseFirestorePlatform
-
The current default FirebaseFirestorePlatform instance.
getter/setter pair