how can i use `.await()` in this context
# coroutines
t
how can i use
.await()
in this context
đź§µ 1
s
You can make another version of your query in your dao which returns the type itself but is a suspending function. Otherwise you could keep the one that returns a flow and do
first()
on it, which should function the same way. Run something like this
AppData.pixelArtDB.pixelArtCreationsDao().getAllPixelArtCreations().first()
while you’re inside a suspending context
Just read this luckily. Don’t do the second option I suggested, do the first one. TIL