Guys imagine I have these two sources of data:
val flowA: Flow<String>
suspend fun funB(): Int
How can I combine the result of both into a flow (let's say Flow<Pair<String, Int>>
)?
How about the approach below? Is there a better way?
combine(
flowA,
flow {emit(funB())}
) { a, b ->
...
}