FlutterComputed<T> constructor

FlutterComputed<T>(
  1. T internalValue(), {
  2. ComputedOptions<T>? options,
  3. @Deprecated('Use options: ComputedOptions(autoDispose: ...) instead') bool? autoDispose,
  4. @Deprecated('Use options: ComputedOptions(name: ...) instead') String? debugLabel,
  5. bool runCallbackOnListen = false,
})

Create a new signal that is computed based on the values of other signals.

The returned computed signal is read-only, and its value is automatically updated when any signals accessed from within the callback function change.

Implementation

FlutterComputed(
  super.internalValue, {
  super.options,
  @Deprecated('Use options: ComputedOptions(autoDispose: ...) instead')
  super.autoDispose,
  @Deprecated('Use options: ComputedOptions(name: ...) instead')
  super.debugLabel,
  this.runCallbackOnListen = false,
});