updateState method

  1. @protected
void updateState()

Implementation

@protected
void updateState() {
  if (isDisabled) {
    setState(ButtonState.disabled);
    return;
  }
  if (isPressed) {
    setState(ButtonState.down);
    return;
  }
  if (isHovered) {
    setState(ButtonState.hover);
    return;
  }
  setState(ButtonState.up);
}