QueryDocumentSnapshot<T extends Object?> class
Represents a snapshot of a document from a query.
Extends DocumentSnapshot for query results.
Parameters:
- data: The document data.
query: The query reference.- metadata: Snapshot metadata.
- rowID: Optional row ID.
Returns: An instance of QueryDocumentSnapshot.
Example:
var querySnapshot = QueryDocumentSnapshot(data, query, metadata, rowID);
- Inheritance
-
- Object
- DocumentSnapshot<
T> - QueryDocumentSnapshot
Constructors
-
QueryDocumentSnapshot(Map<
String, dynamic> data, dynamic query, dynamic metadata, dynamic rowID) - QueryDocumentSnapshot.fromJson(dynamic jsonString)
-
Creates a QueryDocumentSnapshot from JSON data.
factory
Properties
- exists → bool
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
finalinherited
- metadata → SnapshotMetadata
-
no setterinherited
-
reference
→ DocumentReference<
T> -
no setterinherited
- rowID → String?
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- version → dynamic
-
finalinherited
Methods
-
data(
) → T -
Gets the data of the document.
override
-
get(
Object field) → dynamic -
Gets the value of a specific field.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → dynamic -
Converts the snapshot to JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
Object field) → dynamic -
Accesses a field in the document data.
inherited