DataSnapshot class
A DataSnapshot contains data from a database location.
See: firebase.google.com/docs/reference/js/firebase.database.DataSnapshot.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- jsObject → DataSnapshotJsImpl
-
JS object.
finalinherited
- key → String
-
The last part of the path at location for this DataSnapshot.
no setter
-
ref
→ DatabaseReference<
ReferenceJsImpl> -
The DatabaseReference for the location that generated this DataSnapshot.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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 childpath
has data. -
hasChildren(
) → bool -
Returns
true
if this DataSnapshot has any children. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
numChildren(
) → int - Returns the number of child properties for this DataSnapshot.
-
toJson(
) → dynamic - Returns a JSON-serializable representation of this object.
-
toString(
) → String -
A string representation of this object.
inherited
-
val(
) → dynamic - Returns Dart value from a DataSnapshot.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getInstance(
DataSnapshotJsImpl jsObject) → DataSnapshot -
Creates a new DataSnapshot from a
jsObject
.