state property
T
get
state
Gets the current state.
Implementation
T get state {
_throwIfDisposed();
return _state;
}
Updates the state and notifies all listeners. Only updates if the notifier is still mounted.
Implementation
@Protected()
set state(T newState) {
_throwIfDisposed();
if (!mounted) return;
if (_state != newState) {
final oldState = _state;
_state = newState;
_notifyListeners(newState, oldState);
}
}