WouterListenableWidgetBuilder<T> typedef

WouterListenableWidgetBuilder<T> = Widget Function(BuildContext, T, List<Widget>)

A builder function for creating a widget that responds to changes in a listenable T.

  • BuildContext: The build context.
  • T: The current value of the listenable.
  • List<Widget>: A list of child widgets, often used in layouts like TabBarView where children correspond to different states of the listenable.

Returns the Widget to be built based on the listenable's state and children. This is commonly used for integrating with Listenable objects to rebuild parts of the UI when the listenable notifies its listeners, for example, managing the active tab in a TabBar and TabBarView setup.

Implementation

typedef WouterListenableWidgetBuilder<T> = Widget Function(
  BuildContext,
  T,
  List<Widget>,
);