SignalReaction<T> class
============================================================================ EFFECTS AND REACTIONS
Reaction - Execute side effects when signal changes.
Reactions run callbacks in response to signal changes.
Basic Usage
final count = Signal<int>(0);
final reaction = SignalReaction(
count,
(value) {
print('Count changed to: $value');
},
);
// Don't forget to dispose!
reaction.dispose();
Constructors
-
SignalReaction(Signal<
T> signal, void callback(T value), {bool when(T oldValue, T newValue)?, bool fireImmediately = false})
Properties
Methods
-
dispose(
) → void - Dispose the reaction.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited