takeUntilLast

fun <T> Flow<T>.takeUntilLast(includeLast: Boolean = true): Flow<T>

Transforms a Flow to emit only up to the first SpecialFlowValue.Last received.

Return

A flow that emits up to the first SpecialFlowValue.Last emitted by the original flow.

Parameters

includeLast

if true the first SpecialFlowValue.Last will be emitted before emission stops.