DataSnapshot

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

They are efficiently-generated immutable copies of the data at a Firebase Database location. They can't be modified and will never change. To modify data at a location, use a
DatabaseReference reference (e.g. with DatabaseReference.setValue).

Properties

Link copied to clipboard

The underlying Firebase Android SDK object.

Link copied to clipboard

Gives access to all of the immediate children of this snapshot. Can be used in native for loops:

Link copied to clipboard

The Android-SDK-shaped com.google.firebase.database.DataSnapshot this wraps.

Link copied to clipboard

The underlying Firebase JS SDK database.

The underlying Firebase JS SDK database.

Link copied to clipboard

Returns true if the snapshot contains a non-null value.

Link copied to clipboard

Indicates whether this snapshot has any children

Link copied to clipboard
val DataSnapshot.ios: FIRDataSnapshot

The underlying Firebase iOS SDK object.

Link copied to clipboard

The underlying Firebase JS SDK object.

The underlying Firebase JS SDK object.

Link copied to clipboard
val key: String?
Link copied to clipboard

Used to obtain a reference to the source location for this snapshot.

Link copied to clipboard
val value: Any?

value returns the data contained in this snapshot as native types.

Functions

Link copied to clipboard
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
inline fun <T> value(): T
inline fun <T> value(strategy: DeserializationStrategy<T>, buildSettings: DecodeSettings.Builder.() -> Unit = {}): T

value returns the data contained in this snapshot as native types.