Created
April 5, 2018 16:18
-
-
Save nanlabsweb/f9175deeead984a30921138a60de6317 to your computer and use it in GitHub Desktop.
Get data from firestore with Coroutines.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
suspend fun getAllPets(): List<Pet> { | |
val result = firestoreDataBase.collection("pets").get().await() | |
return setPetsFromSnapshotIntoMutableList(result) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment