state property
The current "state" of this StateNotifier
.
Updating this variable will synchronously call all the listeners. Notifying the listeners is O(N) with N the number of listeners.
Updating the state will throw if at least one listener throws.
Implementation
@protected
@visibleForTesting
T get state {
assert(_debugIsMounted(), '');
return _state;
}
Do not use the setter for state.
Instead, use await update(value).
Implementation
@override
set state(T value) {
assert(false,
"Don\'t use the setter for state. Instead use `await update(value)`.");
Future(() async {
await update(value);
});
}