plus

operator fun <T, R : T> Flow<T>.plus(other: Flow<R>): Flow<T>

Combines two Flows of the same base type T into a single Flow by concatenating their elements.

Return

A new Flow containing the concatenated elements of both the current and the others.

Example usage:

val flow1 = flowOf(1, 2, 3)
val flow2 = flowOf(4, 5, 6)
val combinedFlow = flow1 + flow2 //1, 2, 3, 4, 5, 6

Parameters

other

The Flow to concatenate with the current Flow.