fromValue static method

GuiState fromValue(
  1. int value
)

Returns the GuiState for the given native value.

Throws ArgumentError if value does not correspond to a known entry.

Implementation

static GuiState fromValue(int value) => switch (value) {
  0 => STATE_NORMAL,
  1 => STATE_FOCUSED,
  2 => STATE_PRESSED,
  3 => STATE_DISABLED,
  _ => throw ArgumentError('Unknown value for $GuiState: $value'),
};