determineControlState method

OudsTextInputControlState determineControlState()

Determines the current material state of the control.

Implementation

OudsTextInputControlState determineControlState() {
  if (!enabled) return OudsTextInputControlState.disabled;
  if (isPressed) return OudsTextInputControlState.pressed;
  if (isHovered) return OudsTextInputControlState.hovered;
  if (isFocused) return OudsTextInputControlState.focused;
  if (isReadOnly) return OudsTextInputControlState.readOnly;
  if (isLoading) return OudsTextInputControlState.loading;
  return OudsTextInputControlState.enabled;
}