scanTtyDevice method Null safety
override
扫描串口设备
Implementation
@override
Future<List<TtyDevice>?> scanTtyDevice() async {
return methodChannel
.invokeMethod(PluginConstants.methodScanTtyDevice)
.then((value) {
return proto.TtyDeviceList.fromBuffer(value)
.items
.map((e) => TtyDevice.fromProto(e))
.toList();
});
}