BloomAnimatedWidget class abstract
A reactive widget bound to a DurableAnimationController that dynamically tracks Bloom dependencies via BloomVia while rebuilding on animation frame ticks.
Seamlessly pairs Bloom's 2-Phase LPDAG engine with element-level DurableAnimationController
lifecycle management, eliminating the need to wrap animated subtrees in StatelessWidget and composed.animate.
Physical tickers are allocated on demand upon mount via an internal vsync socket and automatically torn down upon unmount.
System Architectural Flow
[ DurableAnimationController Frame Tick ]
│
│ (Socket Tick: markNeedsBuild())
▼
[ BloomAnimatedElement.performRebuild() ]
│
▼
[ BloomAnimatedWidget.build(context, via, controller) ]
Key Invariants & Architectural Benefits
- Zero Boilerplate Componentization: Eliminates StatelessWidget and
composed.animatewrapping. - Immutable Const Contract: Supports
constconstructors with zero mutable state on the widget instance. - Element-Scoped Controller Proxy: The injected ScopedAnimationController provides safe access to
.viewand.drive, automatically purged upon unmount to prevent leaks. - 0-Compute Reactive Memoization: Simultaneously tracks reactive Bloom dependencies dynamically via BloomVia.
Examples
class MyAnimatedTrack extends BloomAnimatedWidget {
const MyAnimatedTrack({
super.key,
required super.controller,
required this.color,
});
final Color color;
@override
Widget build(BuildContext context, BloomVia via, ScopedAnimationController controller) {
return Transform.scale(
scale: controller.value,
child: Container(color: color),
);
}
}
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- BloomAnimatedWidget
Constructors
- BloomAnimatedWidget({Key? key, required DurableAnimationController controller})
-
Initializes a BloomAnimatedWidget with
controllerand an optionalkey.const
Properties
- controller → DurableAnimationController
-
The underlying durable animation controller driving this widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context, BloomVia via, ScopedAnimationController controller) → Widget - Describes the part of the user interface represented by this widget, with explicit BloomVia tracking and an injected ScopedAnimationController.
-
createElement(
) → BloomAnimatedElement -
Inflates this configuration to a concrete instance.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited