Properties

Link copied to clipboard
val <S> MutableState<S>.mutableStateFlow: <Error class: unknown class><S>

Extension property returning a MutableStateFlow for a MutableState.

Link copied to clipboard
val <S> ObservableState<S>.stateFlow: <Error class: unknown class><S>

Extension property returning a StateFlow for an ObservableState.

Functions

Link copied to clipboard
abstract fun getState(): S

Get current state.

Link copied to clipboard
abstract fun setState(state: S)

Set current state.

Link copied to clipboard
fun <S, T> ObservableState<S>.sub(contextWidget: Widget? = null, extractor: (S) -> T): ObservableState<T>

Returns a sub-store of the original ObservableState

Link copied to clipboard
abstract fun subscribe(observer: (S) -> Unit): () -> Unit

Subscribe for the state change notifications. Calls the observer with the current state.