Package-level declarations

Functions

Link copied to clipboard
fun <T, A> MutableState<T>.optic(lens: Lens<T, A>): MutableState<A>

Exposes the value of this through the optic. Any change made to value is reflected in the original MutableState.

fun <T, A> State<T>.optic(g: Getter<T, A>): State<A>

Exposes the value of this through the optic.

fun <T, A> MutableStateFlow<T>.optic(lens: Lens<T, A>): MutableStateFlow<A>

Exposes the values of this through the optic. Any change made to value is reflected in the original MutableStateFlow.

fun <T, A> SharedFlow<T>.optic(g: Getter<T, A>): SharedFlow<A>
fun <T, A> StateFlow<T>.optic(g: Getter<T, A>): StateFlow<A>

Exposes the values of this through the optic.

Link copied to clipboard
inline fun <T> MutableState<T>.update(crossinline block: (T) -> T)

Modifies the value in this MutableState by applying the function block to the current value.

Link copied to clipboard
fun <T> MutableState<T>.updateCopy(block: Copy<T>.() -> Unit)

Modifies the value in this MutableState by performing the operations in the Copy.

fun <T> MutableStateFlow<T>.updateCopy(block: Copy<T>.() -> Unit)

Updates the value in this MutableStateFlow by performing the operations in the Copy.