AsyncNotifierProvider<NotifierT extends AsyncNotifier<ValueT> , ValueT> constructor
AsyncNotifierProvider<NotifierT extends AsyncNotifier<ValueT> , ValueT> (
- NotifierT _createNotifier(), {
- String? name,
- Iterable<
ProviderOrFamily> ? dependencies, - bool isAutoDispose = false,
- Retry? retry,
A provider which creates and listen to an AsyncNotifier.
This is similar to FutureProvider but allows to perform side-effects.
The syntax for using this provider is slightly different from the others
in that the provider's function doesn't receive a "ref" (and in case
of family
, doesn't receive an argument either).
Instead the ref (and argument) are directly accessible in the associated
AsyncNotifier.
Implementation
AsyncNotifierProvider(
this._createNotifier, {
super.name,
super.dependencies,
super.isAutoDispose = false,
super.retry,
}) : super(
$allTransitiveDependencies: computeAllTransitiveDependencies(
dependencies,
),
from: null,
argument: null,
);