QueryDocumentSnapshot extension type

A QueryDocumentSnapshot contains data read from a document in your Firestore database as part of a query. The document is guaranteed to exist and its data can be extracted with .data() or .get(<field>) to get a specific field.

A QueryDocumentSnapshot offers the same API surface as a DocumentSnapshot. Since query results contain only existing documents, the exists property will always be true and data() will never return 'undefined'.

on
Implemented types
Available extensions

Properties

createTime Timestamp
The time the document was created.
no setteroverride
exists bool
True if the document exists.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
The ID of the document for which this DocumentSnapshot contains data.
no setterinherited
readTime Timestamp
The time this snapshot was read.
no setterinherited
ref DocumentReference
A DocumentReference to the document location.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
updateTime Timestamp
The time the document was last updated (at the time the snapshot was generated).
no setteroverride

Methods

data() JSObject
Retrieves all fields in the document as an Object.
override
get(JSAny fieldPath) JSObject
Retrieves the field specified by fieldPath.
inherited
isEqual(DocumentSnapshot other) bool
Returns true if the document's data and path in this DocumentSnapshot is equal to the provided one.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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