fromValue static method
Returns the MouseButton for the given native value.
Throws ArgumentError if value does not correspond to a known entry.
Implementation
static MouseButton fromValue(int value) => switch (value) {
0 => MOUSE_BUTTON_LEFT,
1 => MOUSE_BUTTON_RIGHT,
2 => MOUSE_BUTTON_MIDDLE,
3 => MOUSE_BUTTON_SIDE,
4 => MOUSE_BUTTON_EXTRA,
5 => MOUSE_BUTTON_FORWARD,
6 => MOUSE_BUTTON_BACK,
_ => throw ArgumentError('Unknown value for $MouseButton: $value'),
};