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