scanUsbDevice method Null safety
override
扫描USB设备
Implementation
@override
Future<List<UsbDevice>?> scanUsbDevice() async {
return methodChannel
.invokeMethod(PluginConstants.methodScanUsbDevice)
.then((value) {
return proto.UsbDeviceList.fromBuffer(value)
.items
.map((e) => UsbDevice.fromProto(e))
.toList();
});
}