DataSnapshot class

A DataSnapshot contains data from a Firebase Database location. Any time you read Firebase data, you receive the data as a DataSnapshot.

Properties

children Iterable<DataSnapshot>
An iterator for snapshots of the child nodes in this snapshot.
no setter
exists bool
Ascertains whether the value exists at the Firebase Database location.
no setter
hashCode int
The hash code for this object.
no setterinherited
key String?
The key of the location that generated this DataSnapshot or null if at database root.
no setter
priority Object?
Gets the priority value of the data in this DataSnapshot or null if no priority set.
no setter
ref DatabaseReference
The Reference for the location that generated this DataSnapshot.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value Object?
Returns the contents of this data snapshot as native types.
no setter

Methods

child(String path) DataSnapshot
Gets another DataSnapshot for the location at the specified relative path. The relative path can either be a simple child name (for example, "ada") or a deeper, slash-separated path (for example, "ada/name/first"). If the child location has no data, an empty DataSnapshot (that is, a DataSnapshot whose value is null) is returned.
hasChild(String path) bool
Returns true if the specified child path has (non-null) data.
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