DocumentReferenceFake class

Constructors

DocumentReferenceFake(String _id, {Future<DocumentSnapshot<Map<String, dynamic>>> get()?, Future<void> update(Map<Object, Object?>)?, Future<void> set(Map<String, dynamic>)?, Stream<DocumentSnapshot<Map<String, dynamic>>>? snapshots})
DocumentReferenceFake.stateful(String id, Map<String, dynamic> documentSnapshotData, void onChanged())
factory

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<Map<String, dynamic>>
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 this DocumentReference.
override
delete() Future<void>
Deletes the current document from the collection.
override
get([GetOptions? options]) Future<DocumentSnapshot<Map<String, dynamic>>>
Reads the document referenced by this DocumentReference.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(Map<String, dynamic> 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<Map<String, dynamic>>>
Notifies of document updates at this location.
override
toString() String
A string representation of this object.
inherited
update(Map<Object, Object?> data) Future<void>
Updates data on the document. Data will be merged with any existing document data.
override
withConverter<R>({required FromFirestore<R> fromFirestore, required ToFirestore<R> toFirestore}) → DocumentReference<R>
Transforms a DocumentReference to manipulate a custom object instead of a Map<String, dynamic>.
override

Operators

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