<https://stackoverflow.com/questions/67518481/how-...
# coroutines
l
combine(liveData1.asFlow(), …)
k
@louiscad This will not work.
🆗 1
r
Not super familiar with the android stuff, but it sounds like this might work: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flatten-concat.html
👍 1
So something like
val myFlow = flowOf(flow1, flow2, flow3).flattenConcat()
k
thanks ! @Ryan Rolnicki Let me try this !
m
@louiscad solution is the right one for the problem you specified. You must be doing something wrong, it should work
r
Ah, yeah, looking at your question in more detail my answer isn't right; what I said will combine the flows such that when collected you will get each element individually, but it looks like you want to tie the results together, which is what combine does.