Issue
I get a flow of type Flow<List<T>> and I need to get a flow of type Flow<T> out of it.
I tried:
outerFlow.onEach { items -> items.onEach { flow { emit(it) } }
This does not work. How can I achieve this?
Solution
outerFlow.flatMapConcat { it.asFlow() }
Answered By - IR42
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.