MockDocumentReference<T extends Object?> class
A class which mocks DocumentReference
.
See the documentation for Mockito's code generation for more information.
Constructors
Properties
- firestore → FirebaseFirestore
-
The Firestore instance associated with this document reference.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
This document's given ID within the collection.
no setteroverride
-
parent
→ CollectionReference<
T> -
The parent
CollectionReference
of this document.no setteroverride - path → String
-
A string representing the path of the referenced document (relative to the
root of the database).
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
collection(
String? collectionPath) → CollectionReference< Map< String, dynamic> > -
Gets a
CollectionReference
instance that refers to the collection at the specified path, relative from thisDocumentReference
.override -
delete(
) → Future< void> -
Deletes the current document from the collection.
override
-
get(
[GetOptions? options]) → Future< DocumentSnapshot< T> > -
Reads the document referenced by this
DocumentReference
.override -
noSuchMethod(
Invocation invocation, {Object? returnValue, Object? returnValueForMissingStub = deferToDefaultResponse}) → dynamic -
Handles method stubbing, method call verification, and real method calls.
inherited
-
set(
T? data, [SetOptions? options]) → Future< void> -
Sets data on the document, overwriting any existing data. If the document
does not yet exist, it will be created.
override
-
snapshots(
{bool? includeMetadataChanges = false}) → Stream< DocumentSnapshot< T> > -
Notifies of document updates at this location.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Map< String, Object?> ? data) → Future<void> -
Updates data on the document. Data will be merged with any existing
document data.
override
-
withConverter<
R> ({FromFirestore< R> ? fromFirestore, ToFirestore<R> ? toFirestore}) → DocumentReference<R> -
Transforms a
DocumentReference
to manipulate a custom object instead of aMap<String, dynamic>
.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited