onEach

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

Returns a flow that invokes the given action before each value of the upstream flow is emitted downstream.