change method

  1. @override
void change(
  1. T newValue, {
  2. StateChange<T>? stateChange,
})
override

Function used to change state.

This function receives the new value of state and preforms changes to the currentValue and the previousValue.

Implementation

@override
void change(T newValue, {StateChange<T>? stateChange}) {
  if (_changeable) {
    _previousValue = _currentValue;
    _currentValue = newValue;
  }
}