Public contract defining the reactive lifecycle controls of a terminal sink.
Serves as the unified interface for all Bloom reactive terminals (RawBloomTerminal, RawViaTerminal, RawComputedTerminal).
The terminal sink represents the ultimate consumer at the boundary between declarative reactive topology and imperative UI/framework environments. Activation and deactivation commands originate from the terminal and propagate through the DAG all the way to root sources.
System Architectural Flow
[External Consumer / UI Framework (e.g. Flutter Element)]
│
├─► .activate() ──► Propagates upstream (0 -> 1: allocates / listens)
├─► .deactivate() ──► Propagates upstream (1 -> 0: deallocates / dormant)
└─► Invalidation <── Upstream dirty pulses trigger onInvalidated
Key Invariants & Architectural Benefits
- Unified Terminal Boundary: Common polymorphic interface for all reactive sinks.
- Lazy Upstream Handshake: Activation commands propagate upstream on-demand to root sources.
- Hot-Reload Reassembly Hook: debugForceInvalidate recursively flushes intermediate caches.
- Implemented types
- Available extensions
Properties
- debugCreationLocation → String?
-
Available on RawTerminal, provided by the RawTerminalDebugExtension extension
The exact code location where this terminal was instantiated in debug mode.no setter -
debugDependencies
→ List<
BloomDebugSnapshot> -
Available on RawTerminal, provided by the RawTerminalDebugExtension extension
Debug-only list of active upstream dependencies currently subscribed by this terminal.no setter - debugLabel ↔ String?
-
Available on RawTerminal, provided by the RawTerminalDebugExtension extension
The developer-defined label to identify this terminal in debug mode.getter/setter pair -
debugTethers
→ List<
Tether> -
Available on RawTerminal, provided by the RawTerminalDebugExtension extension
Debug-only list of active declarative Tether instances tethered to this terminal's lifecycle.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isActive → bool
-
Whether the node is currently active (connected to a downstream terminal).
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
activate(
) → void - Activates the terminal, signaling upstream nodes to attach listeners and allocate resources.
-
deactivate(
) → void - Deactivates the terminal, detaching from upstream sources and releasing resources.
-
debugForceInvalidate(
) → void - Debug & Hot-Reload hook that recursively invalidates upstream intermediate caches and bumps root dirty versions to force fresh recomputations across the DAG.
-
debugTrace(
[String? label, int traceCount = 5]) → void -
Available on RawTerminal, provided by the RawTerminalDebugExtension extension
Captures the current stack trace and assigns an optional label to this terminal. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withDebugLabel<
T extends RawTerminal> (String label) → T -
Available on RawTerminal, provided by the RawTerminalDebugExtension extension
Assigns a developer-defined debug label and returns this terminal.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited