setError method

void setError()

Sets the button state to error.

Implementation

void setError() {
  (stateKey.currentState as _ButtonStatesState).setError();
}