fromValue static method

GhosttySgrUnderline fromValue(
  1. int value
)

Implementation

static GhosttySgrUnderline fromValue(int value) => switch (value) {
  0 => GHOSTTY_SGR_UNDERLINE_NONE,
  1 => GHOSTTY_SGR_UNDERLINE_SINGLE,
  2 => GHOSTTY_SGR_UNDERLINE_DOUBLE,
  3 => GHOSTTY_SGR_UNDERLINE_CURLY,
  4 => GHOSTTY_SGR_UNDERLINE_DOTTED,
  5 => GHOSTTY_SGR_UNDERLINE_DASHED,
  _ => throw ArgumentError('Unknown value for GhosttySgrUnderline: $value'),
};