FakeFirebaseFirestore class
Properties
-
app
↔ FirebaseApp
-
The
FirebaseApp
for this current FirebaseFirestore
instance.
read / writeinherited
-
authObject
→ BehaviorSubject<Map<String, dynamic>?>
-
final
-
databaseURL
↔ String
-
Firestore Database URL for this instance. Falls back to default database: "(default)"
read / writeinherited
-
hashCode
→ int
-
The hash code for this object.
read-onlyinherited
-
pluginConstants
→ Map
-
Returns any plugin constants this plugin app instance has initialized.
read-onlyinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
securityRules
→ FakeFirebaseSecurityRules
-
final
-
settings
↔ Settings
-
The current
Settings
for this FirebaseFirestore
instance.
read / writeinherited
Methods
-
batch()
→ WriteBatch
-
Returns a
WriteBatch
, used for performing multiple writes as a single
atomic operation.
override
-
clearPersistence()
→ Future<void>
-
Clears any persisted data for the current instance.
inherited
-
collection(String path)
→ CollectionReference<Map<String, dynamic>>
-
Gets a
CollectionReference
for the specified Firestore path.
override
-
collectionGroup(String collectionId)
→ CollectionReference<Map<String, dynamic>>
-
Gets a
Query
for the specified collection group.
override
-
disableNetwork()
→ Future<void>
-
Instructs
FirebaseFirestore
to disable the network for the instance.
inherited
-
doc(String path)
→ DocumentReference<Map<String, dynamic>>
-
Gets a
DocumentReference
for the specified Firestore path.
override
-
dump()
→ String
-
-
enableNetwork()
→ Future<void>
-
Enables the network for this instance. Any pending local-only writes
will be written to the remote servers.
inherited
-
enablePersistence([PersistenceSettings? persistenceSettings])
→ Future<void>
-
Enable persistence of Firestore data for web-only. Use
Settings.persistenceEnabled
for non-web platforms.
If enablePersistence()
is not called, it defaults to Memory cache.
If enablePersistence(const PersistenceSettings(synchronizeTabs: false))
is called, it persists data for a single browser tab.
If enablePersistence(const PersistenceSettings(synchronizeTabs: true))
is called, it persists data across multiple browser tabs.
inherited
-
hasSavedDocument(String path)
→ bool
-
-
loadBundle(Uint8List bundle)
→ LoadBundleTask
-
inherited
-
maybeThrowSecurityException(String path, Method method)
→ Future<void>
-
-
namedQueryGet(String name, {GetOptions options = const GetOptions()})
→ Future<QuerySnapshot<Map<String, dynamic>>>
-
Reads a
QuerySnapshot
if a namedQuery has been retrieved and passed as a Buffer
to loadBundle(). To read from cache, pass GetOptions.source
value as Source.cache
.
To read from the Firestore backend, use GetOptions.source
as Source.server
.
inherited
-
namedQueryWithConverterGet<T>(String name, {GetOptions options = const GetOptions(), required FromFirestore<T> fromFirestore, required ToFirestore<T> toFirestore})
→ Future<QuerySnapshot<T>>
-
Performs a namedQueryGet and decode the result using
Query.withConverter
.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
override
-
removeSavedDocument(String path)
→ bool
-
-
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.
override
-
saveDocument(String path)
→ void
-
-
setIndexConfiguration({required List<Index> indexes, List<FieldOverrides>? fieldOverrides})
→ Future<void>
-
Configures indexing for local query execution. Any previous index configuration is overridden.
inherited
-
setIndexConfigurationFromJSON(String json)
→ Future<void>
-
Configures indexing for local query execution. Any previous index configuration is overridden.
inherited
-
snapshotsInSync()
→ Stream<void>
-
Returns a Stream which is called each time all of the active listeners
have been synchronized.
inherited
-
terminate()
→ Future<void>
-
Terminates this
FirebaseFirestore
instance.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
useFirestoreEmulator(String host, int port, {bool sslEnabled = false})
→ void
-
Changes this instance to point to a FirebaseFirestore emulator running locally.
inherited
-
waitForPendingWrites()
→ Future<void>
-
Waits until all currently pending writes for the active user have been
acknowledged by the backend.
inherited
Operators
-
operator ==(dynamic other)
→ bool
-
The equality operator.
override