InheritedProvider<T> constructor
InheritedProvider<T> ({
- Key? key,
- Create<
T> ? create, - T update(
- BuildContext context,
- T? value
- UpdateShouldNotify<
T> ? updateShouldNotify, - void debugCheckInvalidValueType(
- T value
- StartListening<
T> ? startListening, - Dispose<
T> ? dispose, - TransitionBuilder? builder,
- bool? lazy,
- Widget? child,
Creates a value, then expose it to its descendants.
The value will be disposed of when InheritedProvider is removed from the widget tree.
Implementation
InheritedProvider({
Key? 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,
Widget? child,
}) : _lazy = lazy,
_delegate = _CreateInheritedProvider(
create: create,
update: update,
updateShouldNotify: updateShouldNotify,
debugCheckInvalidValueType: debugCheckInvalidValueType,
startListening: startListening,
dispose: dispose,
),
super(key: key, child: child);