timeoutFirstOrNull

fun <T> Flow<T>.timeoutFirstOrNull(millis: Long): Flow<T?>(source)

If the upstream emits no first event within millis milliseconds it will emit null followed by all later emissions from the upstream.


fun <T> Flow<T>.timeoutFirstOrNull(duration: Duration): Flow<T?>(source)

If the upstream emits no first event within duration it will emit null followed by all later emissions from the upstream.