AutoDisposeFamilyAsyncNotifier<State, Arg> class abstract

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.

When using autoDispose or family, your notifier type changes. Instead of extending AsyncNotifier, you should extend either:


arg ↔ Arg
The argument that was passed to this family.
future Future<State>
Obtains a Future that resolves with the first state value that is not AsyncLoading.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
ref AutoDisposeAsyncNotifierProviderRef<State>
The Ref from the provider associated with this AsyncNotifier.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state AsyncValue<State>
The value currently exposed by this AsyncNotifier.
getter/setter pairinherited


build(Arg arg) FutureOr<State>
Initialize an AsyncNotifier.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toString() String
A string representation of this object.
update(FutureOr<State> cb(State), {FutureOr<State> onError(Object err, StackTrace stackTrace)?}) Future<State>
A function to update state from its previous value, while abstracting loading/error cases for state.
updateShouldNotify(AsyncValue<State> previous, AsyncValue<State> next) bool
A method invoked when the state exposed by this AsyncNotifier changes.


operator ==(Object other) bool
The equality operator.