takeWhile

@ExperimentalCoroutinesApi fun <T> Flow<T>.takeWhile(
    predicate: suspend (T) -> Boolean
): Flow<T>
(source)

Returns a flow that contains first elements satisfying the given predicate.