DataSnapshot

actual class DataSnapshot(source)
expect class DataSnapshot(source)

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).

actual class DataSnapshot(source)
actual class DataSnapshot(source)
actual class DataSnapshot(source)

Properties

Link copied to clipboard
val DataSnapshot.android: DataSnapshot
val DataSnapshot.android: DataSnapshot
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
val database: Database
Link copied to clipboard
actual val exists: Boolean
expect val exists: Boolean

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

actual val exists: Boolean
actual val exists: Boolean
actual val exists: Boolean
Link copied to clipboard
actual val hasChildren: Boolean
expect val hasChildren: Boolean

Indicates whether this snapshot has any children

actual val hasChildren: Boolean
actual val hasChildren: Boolean
actual val hasChildren: Boolean
Link copied to clipboard
val DataSnapshot.ios: FIRDataSnapshot
Link copied to clipboard
val DataSnapshot.js: DataSnapshot
Link copied to clipboard
actual val key: String?
expect val key: String?
actual val key: String?
actual val key: String?
actual val key: String?
Link copied to clipboard

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

Link copied to clipboard
actual val value: Any?
expect val value: Any?

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

actual val value: Any?
actual val value: Any?
actual val value: Any?

Functions

Link copied to clipboard
actual fun child(path: String): DataSnapshot
expect fun child(path: String): DataSnapshot
actual fun child(path: String): DataSnapshot
actual fun child(path: String): DataSnapshot
actual fun child(path: String): DataSnapshot
Link copied to clipboard
actual inline fun <T> value(): T
actual inline fun <T> value(strategy: DeserializationStrategy<T>, buildSettings: DecodeSettings.Builder.() -> Unit): T
expect inline fun <T> value(): T
expect inline fun <T> value(strategy: DeserializationStrategy<T>, buildSettings: DecodeSettings.Builder.() -> Unit = {}): T

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

actual inline fun <T> value(): T
actual inline fun <T> value(strategy: DeserializationStrategy<T>, buildSettings: DecodeSettings.Builder.() -> Unit): T
actual inline fun <T> value(): T
actual inline fun <T> value(strategy: DeserializationStrategy<T>, buildSettings: DecodeSettings.Builder.() -> Unit): T
actual inline fun <T> value(): T
actual inline fun <T> value(strategy: DeserializationStrategy<T>, buildSettings: DecodeSettings.Builder.() -> Unit): T