UpdateMutableState

abstract class UpdateMutableState<T, R>(var base: T) : MutableState<R?> (source)

An abstract class that implements the MutableState interface and provides a base for creating mutable state objects.

This class is designed to be extended by concrete mutable state implementations. It provides a base property that holds the underlying value of the state, as well as methods for getting, setting, and updating the base value.

Subclasses must implement the getValue and setValue methods to define how the state value is accessed and modified.

Parameters

T

The type of the base value.

R

The type of the state value.

Inheritors

Constructors

Link copied to clipboard
constructor(base: T)

Properties

Link copied to clipboard
var base: T

The underlying value of the state.

Functions

Link copied to clipboard
abstract operator override fun getValue(thisRef: Any?, prop: KProperty<*>): R?
Link copied to clipboard
abstract operator override fun setValue(thisRef: Any?, prop: KProperty<*>, value: R?)
Link copied to clipboard
open fun updateBase(newBase: T)