state<T> function

Widget Function({required Widget child}) state<T>(
  1. void proxyBuilder(
    1. BuildContext context,
    2. StateTreeNode<T> node
    )
)

Implementation

Widget Function({required Widget child}) state<T>(
  void Function(BuildContext context, StateTreeNode<T> node) proxyBuilder,
) {
  return ({required Widget child}) {
    return StateTreeBuilder<T>(
      (context, n, child) {
        proxyBuilder(context, n);
        return child;
      },
      child: child,
    );
  };
}