handleOnlyEmit

open fun <A, E> handleOnlyEmit(execute: suspend FlowCollector<E>.(D, A) -> Unit): EmittingHandler<A, E>

factory method to create an EmittingHandler taking an action-value and the current store value but does not derive a new value from both. The actual value is just passed through, so it is all about dealing with some side effect by calling the FlowCollector.emit function from within the execute parameter.

Parameters

execute

lambda that is executed for each action-value on the connected Flow. You should emit values from this lambda.

See also


open fun <E> handleOnlyEmit(execute: suspend FlowCollector<E>.(D) -> Unit): EmittingHandler<Unit, E>

factory method to create an EmittingHandler taking the current store value but does not derive a new value from it. The actual value is just passed through, so it is all about dealing with some side effect by calling the FlowCollector.emit function from within the execute parameter.

Parameters

execute

lambda that is executed for each action-value on the connected Flow. You should emit values from this lambda.

See also