children method
Widget
children(
- DurableAnimationController controller,
- Widget builder(
- BuildContext context,
- BloomVia via,
- ScopedAnimationController controller,
- List<
Widget> children,
- required List<
Widget> children, - Key? key,
Creates an inline reactive widget bound to a DurableAnimationController with isolated static children.
controller: The target durable animation controller.builder: Reactive builder callback receiving BuildContext, BloomVia, ScopedAnimationController, andchildren.children: The static subtrees to preserve across rebuilds.key: Optional widget key.
Requires:
buildermust be a pure, declarative function.
Ensures:
- Returns an animated reactive Widget isolating static
childrenfrom frame-tick rebuilds.
Examples
composed.animate.children(
controller,
(context, via, ctrl, children) => SlideTransition(
position: ctrl.drive(Tween(begin: const Offset(0, 1), end: Offset.zero)),
child: Column(children: children),
),
children: const [HeadlineWidget(), BodyWidget()],
);
Implementation
@pragma('vm:prefer-inline')
Widget children(
DurableAnimationController controller,
Widget Function(BuildContext context, BloomVia via,
ScopedAnimationController controller, List<Widget> children)
builder, {
required List<Widget> children,
Key? key,
}) =>
_ComposedAnimateWithChildrenWidget(
controller: controller,
builder: builder,
key: key,
children: children,
);