SimplexBuildComponent class abstract base

A high-performance declarative UI component optimized for a single inbound dependency (1:1).

Unlike BuildComponent (which manages an N:1 list of inbound dependencies), SimplexBuildComponent binds directly to a single upstream CoralNode returned by manifest.

Design Philosophy: Eliminates list allocations (List.unmodifiable) and iteration overhead for single-stream UI components (such as badges, toggles, or dynamic labels).

AI & Developer Note:

Example:

base class CounterBadge extends SimplexBuildComponent {
  CounterBadge({required this.count});

  final Coral<int> count;

  @override
  @manifestSync
  CoralNode manifest() => count;

  @override
  Widget build() {
    return Text('Count: ${count.data}');
  }
}
Inheritance
Implementers
Available extensions

Constructors

SimplexBuildComponent()

Properties

coral Coral<Widget>
Exposes the underlying topological node that powers this computation.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isActivated bool
Indicates whether the underlying topological node is currently active in the graph.
no setterinherited
isDeactivated bool
Indicates whether the underlying topological node is currently deactivated.
no setterinherited
isPaused bool
Indicates whether the underlying topological node is currently in a paused state.
no setterinherited
isRunning bool
Indicates whether the underlying topological node is running and processing events.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build() Widget
Builds the declarative UI Widget subtree based on the single reactive state.
compute() Widget
Performs the actual computation and returns the new value for this node based on the single upstream dependency.
override
iterateInbound() Iterable<CoralNode>
Iterates over all direct upstream inbound nodes connected to this computation.
inherited
manifest() CoralNode
Declares the single upstream reactive dependency CoralNode that powers this component.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
toWidget({Key? key, Widget errorBuilder(BuildContext context, Object error, StackTrace? stackTrace)?}) CoralWidget

Available on T, provided by the CoralComputationWidgetExtension extension

Converts this Computation into a strongly-typed CoralWidget.
toWidget({Key? key, Widget errorBuilder(BuildContext context, Object error, StackTrace? stackTrace)?}) CoralWidget

Available on CoralProvider<Widget>, provided by the CoralWidgetProviderExtension extension

Converts this CoralProvider into a CoralWidget.

Operators

operator ==(Object other) bool
The equality operator.
inherited