DerivedStateFlow

class DerivedStateFlow<T>(getValue: () -> T, flow: Flow<T>) : StateFlow<T>

Does not produce the same value in a raw, so respect "distinct until changed emissions" https://github.com/Kotlin/kotlinx.coroutines/issues/2631#issuecomment-870565860

Constructors

Link copied to clipboard
constructor(getValue: () -> T, flow: Flow<T>)

Properties

Link copied to clipboard
open override val replayCache: List<T>
Link copied to clipboard
open override val value: T

Functions

Link copied to clipboard
@InternalCoroutinesApi
open suspend override fun collect(collector: FlowCollector<T>): Nothing

Inherited functions

Link copied to clipboard
fun <T1, R> StateFlow<T1>.mapState(transform: (a: T1) -> R): StateFlow<R>