proxy2<E, A, B> function

ProxyProvider2<A, B, E> proxy2<E, A, B>(
  1. LifecycleAwareBuilder3<E, A, B> create, {
  2. bool lazy = true,
  3. Widget? child,
})

Implementation

ProxyProvider2<A, B, E> proxy2<E, A, B>(LifecycleAwareBuilder3<E, A, B> create,
        {bool lazy = true, Widget? child}) =>
    ProxyProvider2<A, B, E>(
      update: (c, a, b, s) => s ?? trying(() => create(a, b)),
      dispose: (context, final value) {
        if (value is LifecycleAware) value.dispose();
      },
      lazy: lazy,
      child: child,
    );