state property
The value currently exposed by this AsyncNotifier.
Defaults to AsyncLoading inside the AsyncNotifier.build method.
Invoking the setter will notify listeners if updateShouldNotify
returns true.
By default, this always notifies listeners (unless going from "loading"
to "loading", in which case the change is ignored).
Reading state
if the provider is out of date (such as if one of its
dependency has changed) will trigger AsyncNotifier.build to be re-executed.
Implementation
@visibleForTesting
@protected
AsyncValue<State> get state {
_element.flush();
// ignore: invalid_use_of_protected_member
return _element.requireState;
}
Implementation
@visibleForTesting
@protected
set state(AsyncValue<State> newState) {
_element.state = newState;
}