onFirst

fun <T> Flow<T>.onFirst(onFirst: (T) -> Unit): Flow<T>

Calls the onFirst lambda when the first element is emitted by the upstream Flow.

Return

The upstream Flow this operator was called on.

Parameters

onFirst

The lambda called when the first element is emmited by the upstream Flow.