providerDoc<T> function

ProxyProvider<DocProvider<T>, T> providerDoc<T>({
  1. Widget builder(
    1. BuildContext,
    2. Widget?
    )?,
  2. Widget? child,
  3. T create(
    1. BuildContext
    )?,
  4. void dispose(
    1. BuildContext,
    2. T
    )?,
  5. Key? key,
  6. bool? lazy,
  7. bool updateShouldNotify(
    1. T,
    2. T
    )?,
})

Implementation

ProxyProvider<DocProvider<T>, T> providerDoc<T>({
  Widget Function(BuildContext, Widget?)? builder,
  Widget? child,
  T Function(BuildContext)? create,
  void Function(BuildContext, T)? dispose,
  Key? key,
  bool? lazy,
  bool Function(T, T)? updateShouldNotify,
}) {
  return ProxyProvider(
    update: (_, doc, __) => doc.doc!,
    builder: builder,
    create: create,
    dispose: dispose,
    key: key,
    lazy: lazy,
    updateShouldNotify: updateShouldNotify,
    child: child,
  );
}