DataSnapshot class

A DataSnapshot contains data from a database location.



hashCode int
The hash code for this object. [...]
read-only, inherited
jsObject → DataSnapshotJsImpl
JS object.
final, inherited
key String
The last part of the path at location for this DataSnapshot.
ref DatabaseReference<ReferenceJsImpl>
The DatabaseReference for the location that generated this DataSnapshot.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


child(String path) DataSnapshot
Returns DataSnapshot for the location at the specified relative path.
exists() bool
Returns true if this DataSnapshot contains any data.
exportVal() → dynamic
Exports the contents of the DataSnapshot as a Dart object.
forEach(dynamic action(DataSnapshot)) bool
Enumerates the top-level children of the DataSnapshot in their query-order. action is called for each child DataSnapshot.
getPriority() → dynamic
Returns priority for data in this DataSnapshot.
hasChild(String path) bool
Returns true if the specified child path has data.
hasChildren() bool
Returns true if this DataSnapshot has any children.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
numChildren() int
Returns the number of child properties for this DataSnapshot.
toJson() → dynamic
Returns a JSON-serializable representation of this object.
toString() String
Returns a string representation of this object.
val() → dynamic
Returns Dart value from a DataSnapshot.


operator ==(Object other) bool
The equality operator. [...]

Static Methods

getInstance(DataSnapshotJsImpl jsObject) DataSnapshot
Creates a new DataSnapshot from a jsObject.