UpdateObservableProperty

constructor(mutableState: UpdateMutableState<T, R>, onUpdated: (R?) -> Unit? = null)(source)

Parameters

T

The type of the base value.

R

The type of the derived value.

mutableState

The UpdateMutableState that holds the base value and the logic to derive the observable value.

onUpdated

An optional callback function that is invoked when the derived value changes. It receives the new derived value (or null if it hasn't been computed yet) as its argument.