DeferredInheritedProvider<T, R> constructor
DeferredInheritedProvider<T, R> ({
- Key? key,
- required Create<
T> create, - Dispose<
T> ? dispose, - required DeferredStartListening<
T, R> startListening, - UpdateShouldNotify<
R> ? updateShouldNotify, - bool? lazy,
- TransitionBuilder? builder,
- Widget? child,
Lazily create an object automatically disposed when DeferredInheritedProvider is removed from the tree.
The object create will be listened using startListening
, and its content
will be exposed to child
and its descendants.
Implementation
DeferredInheritedProvider({
Key? key,
required Create<T> create,
Dispose<T>? dispose,
required DeferredStartListening<T, R> startListening,
UpdateShouldNotify<R>? updateShouldNotify,
bool? lazy,
TransitionBuilder? builder,
Widget? child,
}) : super._constructor(
key: key,
child: child,
lazy: lazy,
builder: builder,
delegate: _CreateDeferredInheritedProvider(
create: create,
dispose: dispose,
updateShouldNotify: updateShouldNotify,
startListening: startListening,
),
);