MockFirebaseFirestore class

A class which mocks FirebaseFirestore.

See the documentation for Mockito's code generation for more information.

Implemented types
  • FirebasePluginPlatform

Constructors

MockFirebaseFirestore()

Properties

app ↔ FirebaseApp
The FirebaseApp for this current FirebaseFirestore instance.
getter/setter pairoverride
hashCode int
The hash code for this object.
no setterinherited
pluginConstants Map
Returns any plugin constants this plugin app instance has initialized.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
settings ↔ Settings
The current Settings for this FirebaseFirestore instance.
getter/setter pairoverride

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.
override
collection(String? collectionPath) → CollectionReference<Map<String, dynamic>>
Gets a CollectionReference for the specified Firestore path.
override
collectionGroup(String? collectionPath) → Query<Map<String, dynamic>>
Gets a Query for the specified collection group.
override
disableNetwork() Future<void>
Instructs FirebaseFirestore to disable the network for the instance.
override
doc(String? documentPath) → DocumentReference<Map<String, dynamic>>
Gets a DocumentReference for the specified Firestore path.
override
enableNetwork() Future<void>
Enables the network for this instance. Any pending local-only writes will be written to the remote servers.
override
enablePersistence([PersistenceSettings? persistenceSettings]) Future<void>
Enable persistence of Firestore data.
override
loadBundle(Uint8List? bundle) → LoadBundleTask
override
namedQueryGet(String? name, {GetOptions? options = const _i11.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.
override
noSuchMethod(Invocation invocation, {Object? returnValue, Object? returnValueForMissingStub = deferToDefaultResponse}) → dynamic
Handles method stubbing, method call verification, and real method calls.
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.
override
snapshotsInSync() Stream<void>
Returns a Stream which is called each time all of the active listeners have been synchronised.
override
terminate() Future<void>
Terminates this FirebaseFirestore instance.
override
toString() String
A string representation of this object.
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.
override

Operators

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