I have flow of some ids lets say `flowOf(1, 2, 3)`...
# flow
b
I have flow of some ids lets say
flowOf(1, 2, 3)
how would I do some suspended operations on them, write results for each in detabase and then only emit once. rn
collect{}
is called every time new item is emited, which is giving me undesirable results. I tried to use
onCompletion
but it only is called when ViewModel dies.
s
Have you tried operators like map. It might be possible to transform the stream with an operation to call the database.