getConfigurations method

Future<List<ConfigDescriptor>> getConfigurations(
  1. Device device
)

Returns the full set of device configuration descriptors. |device|: The Device to fetch descriptors from.

Implementation

Future<List<ConfigDescriptor>> getConfigurations(Device device) async {
  var $res = await $js.chrome.usb.getConfigurations(device.toJS).toDart;
  return $res.toDart
      .cast<$js.ConfigDescriptor>()
      .map((e) => ConfigDescriptor.fromJS(e))
      .toList();
}