Provider<T> constructor
Provider<T> ({})
Creates a value, store it, and expose it to its descendants.
The value can be optionally disposed using dispose
callback.
This callback which will be called when Provider is unmounted from the
widget tree.
Implementation
Provider({
Key? key,
required Create<T> create,
Dispose<T>? dispose,
bool? lazy,
TransitionBuilder? builder,
Widget? child,
}) : super(
key: key,
lazy: lazy,
builder: builder,
create: create,
dispose: dispose,
debugCheckInvalidValueType: kReleaseMode
? null
: (T value) =>
Provider.debugCheckInvalidValueType?.call<T>(value),
child: child,
);