xprovider<E> function
Provider<E>
xprovider<E>(
- LifecycleAwareContextBuilder<
E> create, { - bool lazy = true,
- Widget? child,
Implementation
Provider<E> xprovider<E>(LifecycleAwareContextBuilder<E> create,
{bool lazy = true, Widget? child}) =>
Provider<E>(
create: (_) => trying(() => create(_)),
dispose: (context, final value) {
if (value is LifecycleAware) value.dispose();
},
lazy: lazy,
child: child,
);