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 (_data.hashCode == newState.hashCode) {
    return;
  }

  _data = newState;
  notifyListeners();
}