AsyncNotifierProvider<N extends AsyncNotifier<T> , T> class
Use an AsyncNotifierProvider to implement a stateful provider.
Changes to the state are propagated to all consumers that
called watch
on the provider.
Constructors
-
AsyncNotifierProvider(N _builder(Ref ref), {ProviderChangedCallback<
AsyncValue< ? onChanged, String? debugLabel, bool debugVisibleInGraph = true})T> >
Properties
- customDebugLabel → String?
-
A custom label used by debug tools.
finalinherited
- debugLabel → String
-
A label to be used in debug messages and
by the
RefenaTracingPage
.no setterinherited - debugVisibleInGraph → bool
-
Set this flag to false to hide the provider from the
RefenaGraphPage
. By default, all providers are visible in the graph. However, some providers add unnecessary noise.finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
-
provider
→ BaseProvider<
N, AsyncValue< T> > -
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createState(
ProxyRef ref) → N -
getActualProvider(
BaseNotifier< Object?> notifier) → AsyncNotifierProvider<N, T> -
inherited
-
getSelectedState(
N notifier, AsyncValue< T> state) → AsyncValue<T> -
The default behavior to return the whole state when
using
ref.watch(provider)
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
overrideWithNotifier(
N builder(Ref ref)) → ProviderOverride< N, AsyncValue< T> > - Overrides with a predefined notifier.
-
select<
R> (R selector(AsyncValue< T> state)) → SelectedWatchable<N, AsyncValue< T> , R> -
Used for ref.watch(provider.select(...)).
Select a part of the state.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
Subclasses should not override this method.
It is used internally by RefenaContainer to map a provider to a state.
inherited