call method
Widget
call(
- Widget builder(
- BuildContext context,
- BloomVia via,
- TickerProvider vsync
- Key? key,
Creates an inline reactive widget providing an element-managed TickerProvider (vsync).
Allocates a dedicated TickerProvider on the host element, eliminating the need for StatefulWidget and SingleTickerProviderStateMixin. Automatically synchronizes with Flutter's TickerMode to pause tickers when dormant and disposes cleanly upon unmount.
builder: Reactive builder callback receiving BuildContext, BloomVia, and TickerProvider.key: Optional widget key.
Requires:
buildermust be a pure, declarative function.
Ensures:
- Returns a reactive Widget with an element-managed TickerProvider.
Examples
composed.vsync((context, via, vsync) {
return LiveClockWidget(vsync: vsync);
});
Implementation
@pragma('vm:prefer-inline')
Widget call(
Widget Function(BuildContext context, BloomVia via, TickerProvider vsync)
builder, {
Key? key,
}) =>
_ComposedVsyncWidget(builder, key: key);