child method

Widget child(
  1. Widget builder(
    1. BuildContext context,
    2. BloomVia via,
    3. TickerProvider vsync,
    4. Widget child,
    ), {
  2. required Widget child,
  3. Key? key,
})

Creates an inline reactive widget providing TickerProvider and an isolated static child.

  • builder: Reactive builder callback receiving BuildContext, BloomVia, TickerProvider, and child.
  • child: The static subtree to preserve across rebuilds.
  • key: Optional widget key.

Requires:

  • builder must be a pure, declarative function.

Ensures:

Examples

composed.vsync.child(
  (context, via, vsync, child) => AnimatedPanel(
    vsync: vsync,
    child: child,
  ),
  child: const StaticComplexForm(),
);

Implementation

@pragma('vm:prefer-inline')
Widget child(
  Widget Function(BuildContext context, BloomVia via, TickerProvider vsync,
          Widget child)
      builder, {
  required Widget child,
  Key? key,
}) =>
    _ComposedVsyncWithChildWidget(
      builder: builder,
      key: key,
      child: child,
    );