Package-level declarations
Flow operators and StateFlow helpers.
Start here:
throttleFirst: let one value through, then ignore values for a while.
mapAsync: map a flow with many calls at the same time, in order.
mapState: derive a
StateFlowfrom aStateFlow, without aCoroutineScope.combineStates: combine two to four
StateFlows into one.
Functions
Link copied to clipboard
Like combine for two StateFlows, but the result is a StateFlow, and no CoroutineScope is needed.
fun <A, B, C, R> combineStates(a: StateFlow<A>, b: StateFlow<B>, c: StateFlow<C>, transform: (A, B, C) -> R): StateFlow<R>
The three-source form of combineStates. The same rules apply.
fun <A, B, C, D, R> combineStates(a: StateFlow<A>, b: StateFlow<B>, c: StateFlow<C>, d: StateFlow<D>, transform: (A, B, C, D) -> R): StateFlow<R>
The four-source form of combineStates. The same rules apply.
Link copied to clipboard