WritableComputedImpl<T> constructor
WritableComputedImpl<T> (
- T getter(),
- void setter(
- T
- JoltDebugFn? onDebug,
Creates a new writable computed value.
Parameters:
getter: Function that computes the value from dependenciessetter: Function called when the computed value is setonDebug: Optional debug callback for reactive system debugging
Example:
final count = Signal(0);
final doubleCount = WritableComputed(
() => count.value * 2,
(value) => count.value = value ~/ 2,
);
Implementation
WritableComputedImpl(super.getter, this.setter, {super.onDebug});