observable<T> static method
ReadWriteProperty<Any?, T>
observable<T>(
- T initialValue,
- void onChange(
- KProperty<
T> property, - T oldValue,
- T newValue
- KProperty<
Returns a property delegate for a read/write property that calls a specified callback function when changed.
Parameters:
initialValue- the initial value of the property.onChange- the callback which is called after the change of the property is made. The value of the property has already been changed when this callback is invoked.
Implementation
external static ReadWriteProperty<Any?, T> observable<T>(
T initialValue,
Unit Function(KProperty<T> property, T oldValue, T newValue) onChange,
);