add Source
abstract fun <T> addSource(flow: Flow<T>, scope: CoroutineScope, block: suspend (State, T) -> State): Job
Add a source of state from another Flow.
This is useful when you need to update the state based off of another Flow. The flow will be collected and block will be invoked in order to map the T value from flow to the State value.
The collecting can be stopped by cancelling the returned Job.
Return
The Job of the collection.