DocumentSnapshot class

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

Properties

exists bool
Returns true if the DocumentSnapshot exists.
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
This document's given ID for this snapshot.
no setter
metadata SnapshotMetadata
Metadata about this DocumentSnapshot concerning its source and if it has local modifications.
no setter
reference DocumentReference
Returns the DocumentReference of this snapshot.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

data() Map<String, dynamic>?
Contains all the data of this DocumentSnapshot.
get(dynamic field) → dynamic
Gets a nested field by String or FieldPath from this DocumentSnapshot.
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
operator [](dynamic field) → dynamic
Gets a nested field by String or FieldPath from this DocumentSnapshot.