> // getDogDetails suspend fun getDogDetils(id:Int) :DogDetails" /> > // getDogDetails suspend fun getDogDetils(id:Int) :DogDetails" /> > // getDogDetails suspend fun getDogDetils(id:Int) :DogDetails"/>

kotlin flow call list item details async

219 Views Asked by At

let us say I have //roomdb

@Query("SELECT * FROM Dog")
fun getAllDogs(): Flow<List<Dog>>

// getDogDetails

suspend fun getDogDetils(id:Int) :DogDetails

I want to hit endpoint to get dog details, however room,sqldelight return Flow<List> as Oneshot, I want to call getDogDetils for all dogs async and return the result as Flow<List<DogDetails>>

1

There are 1 best solutions below

2
Saba Zafar On

It would be easy if you share more details about entity of Dog or schema of your table