updateState method

void updateState(
  1. T newState
)
inherited

updateState Updates the state and notifies listeners if the value has changed.

Implementation

void updateState(T newState) {
  if (_value == newState) {
    return;
  }

  _value = newState;
  notifyListeners();
}