FirebaseFirestoreWeb class

Web implementation for FirebaseFirestorePlatform delegates calls to firestore web plugin

Inheritance
  • Object
  • PlatformInterface
  • FirebaseFirestoreWeb

Constructors

FirebaseFirestoreWeb({FirebaseApp? app, String? databaseId})
Builds an instance of FirebaseFirestoreWeb with an optional FirebaseApp instance If app is null then the created instance will use the default FirebaseApp

Properties

app → FirebaseApp
Returns the FirebaseApp for the current instance.
no setterinherited
appInstance → FirebaseApp?
The FirebaseApp this instance was initialized with.
finalinherited
databaseChoice String?
finalinherited
databaseId String
Firestore Database URL for this instance. Falls back to default database: "(default)"
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
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, required String databaseId}) → 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? settings]) Future<void>
Enable persistence of Firestore data.
loadBundle(Uint8List bundle) → LoadBundleTaskPlatform
Loads a Firestore bundle into the local cache. Returns a LoadBundleTask which notifies callers with progress updates, and completion or error events.
namedQueryGet(String name, {GetOptions options = const GetOptions()}) Future<QuerySnapshotPlatform>
Reads a Firestore Query which has been loaded using loadBundle()
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), int maxAttempts = 5}) Future<T?>
Executes the given TransactionHandler and then attempts to commit the changes applied within an atomic transaction.
setIndexConfiguration(String indexConfiguration) Future<void>
Configures indexing for local query execution. Any previous index configuration is overridden.
setLoggingEnabled(bool enabled) Future<void>
Globally enables / disables Cloud Firestore logging for the SDK.
snapshotsInSync() Stream<void>
Returns a Stream 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.
inherited
useEmulator(String host, int port) → void
useEmulator is used for web only. Native platforms use Firestore settings to initialize emulator.
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.
inherited

Static Methods

registerWith(Registrar registrar) → void
Called by PluginRegistry to register this plugin for Flutter Web