SignalListObserveExtension extension
Extension on List<ReadonlySignal> to provide fluent observe API for multiple signals.
This allows calling .observe() directly on a list of signals:
final firstName = SignalsWatch.signal('John');
final lastName = SignalsWatch.signal('Doe');
// Instead of:
SignalsWatch.fromSignals([firstName, lastName], combine: ..., builder: ...)
// You can write:
[firstName, lastName].observe(
combine: (values) => '${values[0]} ${values[1]}',
builder: (fullName) => Text(fullName),
)
- on
Methods
-
observe<
R> ({Key? key, required R combine(List), required Widget builder(R), void onInit(R value)?, Function? onValueUpdated, void onAfterBuild(R value)?, void onDispose(R value)?, bool shouldRebuild(R newValue, R oldValue)?, bool shouldNotify(R newValue, R oldValue)?, bool equals(R a, R b)?, Duration? debounce, Duration? throttle, void onError(Object error, StackTrace stack)?, Widget errorBuilder(Object error)?, Widget loadingBuilder()?, String? debugLabel, bool debugPrint = false}) → SignalsWatch< R> -
Available on List<
Observe multiple signals and rebuild when any changes.ReadonlySignal> , provided by the SignalListObserveExtension extension