provider<E> function

Provider<E> provider<E>(
  1. LifecycleAwareBuilder<E> create, {
  2. bool lazy = true,
  3. Widget? child,
})

Implementation

Provider<E> provider<E>(LifecycleAwareBuilder<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,
    );