fromValue static method

libusb_hotplug_event fromValue(
  1. int value
)

Implementation

static libusb_hotplug_event fromValue(int value) => switch (value) {
      1 => LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED,
      2 => LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT,
      _ =>
        throw ArgumentError("Unknown value for libusb_hotplug_event: $value"),
    };