InheritedProvider<T> constructor

InheritedProvider<T>({
  1. Key? key,
  2. Create<T>? create,
  3. T update(
    1. BuildContext context,
    2. T? value
    )?,
  4. UpdateShouldNotify<T>? updateShouldNotify,
  5. void debugCheckInvalidValueType(
    1. T value
    )?,
  6. StartListening<T>? startListening,
  7. Dispose<T>? dispose,
  8. TransitionBuilder? builder,
  9. bool? lazy,
  10. Widget? child,
})

Provides the value create makes, or update makes anew; one of them is given.

Implementation

InheritedProvider({
  super.key,
  Create<T>? create,
  T Function(BuildContext context, T? value)? update,
  UpdateShouldNotify<T>? updateShouldNotify,
  void Function(T value)? debugCheckInvalidValueType,
  StartListening<T>? startListening,
  Dispose<T>? dispose,
  this.builder,
  bool? lazy,
  super.child,
}) : assert(
       create != null || update != null,
       'an InheritedProvider needs a create or an update',
     ),
     lazy = lazy ?? true,
     _delegate = _CreateDelegate(
       create: create,
       update: update,
       updateShouldNotify: updateShouldNotify,
       debugCheckInvalidValueType: debugCheckInvalidValueType,
       startListening: startListening,
       dispose: dispose,
     );