state property

  1. @protected
AsyncValue<State> state
inherited

The value currently exposed by this Notifier.

Invoking the setter will notify listeners if updateShouldNotify returns true. By default, this will compare the previous and new value using identical.

Reading state if the provider is out of date (such as if one of its dependency has changed) will trigger Notifier.build to be re-executed.

Implementation

@protected
AsyncValue<State> get state {
  _element.flush();
  // ignore: invalid_use_of_protected_member
  return _element.requireState;
}
  1. @protected
void state=(AsyncValue<State> newState)
inherited

Implementation

@protected
set state(AsyncValue<State> newState) {
  _element.state = newState;
}