ktx / com.google.firebase.firestore.ktx / com.google.firebase.firestore.QuerySnapshot / toObjects

toObjects

inline fun <reified T : Any> QuerySnapshot.toObjects(): List<T>

Returns the contents of the documents in the QuerySnapshot, converted to the provided class, as a list.

Parameters

T - The POJO type used to convert the documents in the list.

inline fun <reified T : Any> QuerySnapshot.toObjects(serverTimestampBehavior: ServerTimestampBehavior): List<T>

Returns the contents of the documents in the QuerySnapshot, converted to the provided class, as a list.

Parameters

T - The POJO type used to convert the documents in the list.

serverTimestampBehavior - Configures the behavior for server timestamps that have not yet been set to their final value.