onFirst

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

Invokes action with the first value only, then emits all values unchanged.

action runs before the first value is emitted downstream and runs again on every new collection.