ReactiveNode class

Base class for all reactive nodes in the dependency tracking system.

A ReactiveNode represents any value that can participate in the reactive dependency graph. This includes signals, computed values, and effects.

Each node maintains two sets of connections:

  • Dependencies (deps): Other nodes that this node depends on
  • Subscribers (subs): Other nodes that depend on this node

The dependency tracking system uses doubly-linked lists to efficiently manage these relationships, allowing for O(1) insertion and removal.

Example node types that extend ReactiveNode:

  • SignalNode: Holds a mutable value
  • ComputedNode: Derives its value from other nodes
  • EffectNode: Runs side effects when dependencies change
Implementers

Constructors

ReactiveNode({required ReactiveFlags flags, Link? deps, Link? depsTail, Link? subs, Link? subsTail})

Properties

deps Link?
Head of the linked list of dependencies (nodes this node depends on). Null if this node has no dependencies.
getter/setter pair
depsTail Link?
Tail of the linked list of dependencies for O(1) append operations. Points to the last dependency link.
getter/setter pair
flags ReactiveFlags
Bit flags representing the current state of this node. See ReactiveFlags for possible values.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
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 pair
subsTail Link?
Tail of the linked list of subscribers for O(1) append operations. Points to the last subscriber link.
getter/setter pair

Methods

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