proxy<E, A> function
ProxyProvider<A, E>
proxy<E, A>(
- LifecycleAwareBuilder2<
E, A> create, { - bool lazy = true,
- Widget? child,
Implementation
ProxyProvider<A, E> proxy<E, A>(LifecycleAwareBuilder2<E, A> create,
{bool lazy = true, Widget? child}) =>
ProxyProvider<A, E>(
update: (c, a, s) => s ?? trying(() => create(a)),
dispose: (context, final value) {
if (value is LifecycleAware) {
value.dispose();
}
},
lazy: lazy,
child: child,
);