EffectNode<T> class
A reactive effect node that runs side effects in response to changes.
EffectNode extends LinkedEffect to add the typed effect callback. Effects are the bridge between the reactive system and the outside world, allowing side effects like DOM updates or logging.
- Inheritance
-
- Object
- ReactiveNode
- LinkedEffect
- EffectNode
Constructors
-
EffectNode({required ReactiveFlags flags, required EffectCallback<
T> fn, EffectCleanup? cleanup})
Properties
- cleanup ↔ EffectCleanup?
-
Cleanup function returned by the latest effect execution.
getter/setter pair
- deps ↔ Link?
-
Head of the linked list of dependencies (nodes this node depends on).
Null if this node has no dependencies.
getter/setter pairinherited
- depsTail ↔ Link?
-
Tail of the linked list of dependencies for O(1) append operations.
Points to the last dependency link.
getter/setter pairinherited
- flags ↔ ReactiveFlags
-
Bit flags representing the current state of this node.
See ReactiveFlags for possible values.
getter/setter pairinherited
-
fn
→ EffectCallback<
T> -
The side effect function to execute.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- nextEffect ↔ LinkedEffect?
-
Next effect in the execution queue.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subs ↔ Link?
-
Head of the linked list of subscribers (nodes that depend on this node).
Null if no other nodes depend on this one.
getter/setter pairinherited
- subsTail ↔ Link?
-
Tail of the linked list of subscribers for O(1) append operations.
Points to the last subscriber link.
getter/setter pairinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
runEffect(
) → EffectCleanup? - Runs the effect callback and returns a cleanup if one was provided.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited