concatWith

fun <T> Flow<T>.concatWith(other: Flow<T>): Flow<T>

Emits the upstream values followed by the values of other.

other is collected only after the upstream completes normally; if the upstream fails or the collector is cancelled, other is never collected.


fun <T> Flow<T>.concatWith(vararg others: Flow<T>): Flow<T>

Emits the upstream values followed by the values of each flow in others, in order.

Each flow is collected only after all preceding flows complete normally; a failure anywhere stops the concatenation.