ComputedImpl<T> constructor
ComputedImpl<T> (
- T getter(), {
- JoltDebugFn? onDebug,
Creates a new computed value with the given getter function.
Parameters:
getter: Function that computes the value based on dependenciesonDebug: Optional debug callback for reactive system debugging
Example:
final count = Signal(0);
final doubled = Computed(() => count.value * 2);
final expensive = Computed(() => heavyCalculation(count.value));
Implementation
ComputedImpl(
super.getter, {
JoltDebugFn? onDebug,
}) : super(flags: ReactiveFlags.none) {
JoltDebug.create(this, onDebug);
}