ktx / com.google.firebase.database.ktx / com.google.firebase.database.DataSnapshot / getValue

getValue

inline fun <reified T> DataSnapshot.getValue(): T?

Returns the content of the DataSnapshot converted to a POJO.

Supports generics like List<> or Map<>. Use @JvmSuppressWildcards to force the compiler to use the type T, and not ? extends T.