A status interface representing the current lifecycle state of an LPDAG node.
Provides a read-only view into the reactive lifecycle state of any node in the topological graph. The Bloom framework operates on a lazy, consumer-driven activation model: nodes are activated lazily when a downstream terminal connects and demands data, and are deactivated when the last consumer disconnects. This interface allows developers and tools to safely observe these transitions without exposing mutable state.
System Architectural Flow
[Terminal / Downstream Consumer]
│ (activate() / 0 -> 1 subscribers)
▼
[LpdagStatus.isActive == true] (Allocates resources / listens to streams)
│ (deactivate() / 1 -> 0 subscribers)
▼
[LpdagStatus.isActive == false] (Disposes resources / enters dormant state)
Architectural Benefits
- Lazy Consumer-Driven Activation: Subscriptions, timers, and heavy resources are instantiated only when demanded by active downstream terminals.
- Observable Zero-Cost Boundary: Exposes read-only lifecycle status without mutation risks.
- Leak-Free Dormancy: Guarantees that unobserved nodes release active subscriptions cleanly.
Examples
final counter = blooming(0);
print(counter.bloom.isActive); // false (no downstream terminals yet)
final terminal = RawBloomTerminal(
counter.bloom,
onInvalidated: () {},
);
terminal.activate();
print(counter.bloom.isActive); // true
print(terminal.isActive); // true
terminal.deactivate();
print(counter.bloom.isActive); // false
- Implementers
- Available extensions
Properties
- debugReflector → LpdagReflector?
-
Available on LpdagStatus, provided by the LpdagStatusReflectorExtension extension
Zero-overhead diagnostic reflector for Flutter DevTools and LPDAG inspection.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 setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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