DocumentSnapshot<T extends Object?> class
Null safety
A DocumentSnapshot contains data read from a document in your FirebaseFirestore database.
The data can be extracted with the data property or by using subscript syntax to access a specific field.
- Implementers
- Annotations
Constructors
Properties
- exists → bool
-
Returns
true
if the document exists.read-only - hashCode → int
-
The hash code for this object.
read-onlyinherited
- id → String
-
This document's given ID for this snapshot.
read-only
- metadata → SnapshotMetadata
-
Metadata about this document concerning its source and if it has local
modifications.
read-only
-
reference
→ DocumentReference<
T> -
Returns the reference of this snapshot.
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
data(
) → T? - Contains all the data of this document snapshot.
-
get(
Object field) → dynamic - Gets a nested field by String or FieldPath from this DocumentSnapshot.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
Object field) → dynamic - Gets a nested field by String or FieldPath from this DocumentSnapshot.