Computed<T> constructor
Computed<T> (
- T getter(), {
- EqualFn? equals,
- JoltDebugOption? debug,
Creates a new computed value with the given getter function.
Parameters:
getter: Function that computes the value based on dependenciesdebug: Optional debug options
Example:
final count = Signal(0);
final doubled = Computed(() => count.value * 2);
final expensive = Computed(() => heavyCalculation(count.value));
Implementation
factory Computed(
T Function() getter, {
EqualFn? equals,
JoltDebugOption? debug,
}) = ComputedImpl;