openDevice method

Future<ConnectionHandle> openDevice(
  1. Device device
)

Opens a USB device returned by getDevices. |device|: The Device to open.

Implementation

Future<ConnectionHandle> openDevice(Device device) async {
  var $res = await promiseToFuture<$js.ConnectionHandle>(
      $js.chrome.usb.openDevice(device.toJS));
  return ConnectionHandle.fromJS($res);
}