DocumentReferencePlatform class Null safety

A DocumentReferencePlatform refers to a document location in a Firestore database and can be used to write, read, or listen to the location.

The document at the referenced location may or may not exist. A DocumentReferencePlatform can also be used to create a CollectionReferencePlatform to a subcollection.



DocumentReferencePlatform(FirebaseFirestorePlatform firestore, String path)
Create instance of DocumentReferencePlatform


firestore FirebaseFirestorePlatform
The Firestore instance associated with this document reference
hashCode int
The hash code for this object.
read-only, override
id String
This document's given or generated ID in the collection.
parent CollectionReferencePlatform
Return the parent CollectionReferencePlatform of this document.
path String
Slash-delimited path representing the database location of this query.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


collection(String collectionPath) CollectionReferencePlatform
Returns a CollectionReferencePlatform starting from the current document pointer.
delete() Future<void>
Deletes the document referred to by this DocumentReferencePlatform.
get([GetOptions options = const GetOptions()]) Future<DocumentSnapshotPlatform>
Reads the document referenced by this DocumentReferencePlatform.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
set(Map<String, dynamic> data, [SetOptions? options]) Future<void>
Writes to the document referred to by this DocumentReferencePlatform.
snapshots({bool includeMetadataChanges = false}) Stream<DocumentSnapshotPlatform>
Notifies of documents at this location
toString() String
A string representation of this object.
update(Map<String, dynamic> data) Future<void>
Updates fields in the document referred to by this DocumentReferencePlatform.


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

Static Methods

verifyExtends(DocumentReferencePlatform instance) → void
Throws an AssertionError if instance does not extend DocumentReferencePlatform.