我有一种流动的类型 Flow<List<T>> 我需要得到一个类型流 Flow<T> 摆脱它。
Flow<List<T>>
Flow<T>
我试过:
outerFlow.onEach { items -> items.onEach { flow { emit(it) } }
这行不通。我怎样才能做到这一点?
https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flat-map-concat.html
outerFlow.flatMapConcat { it.asFlow() }