ObservableProperty
A generic observable property that allows for value observation and modification.
This class encapsulates a value of type T and provides mechanisms to:
Get and set the value.
Register listeners that are notified before or after the value changes.
Bind to a callback that is invoked when the value changes or when the binding is established.
It uses a MutableState to manage the underlying state, making it compatible with Compose's state management system.
Parameters
The type of the value held by this observable property.
Inheritors
Functions
Registers a listener that is notified after the value of this property has changed.
Registers a listener that is invoked before the property's value changes.
Sets the value of the observable property using property delegation. This is a convenience method that delegates to MutableState.setValue.
Sets the value of the property without invoking the beforeChange
and afterChange
listeners. However, the onUpdated
callback (if set) and onBindCallback
callback will still be triggered.