connectDevice method

Future<void> connectDevice(
  1. String deviceId
)

连接设备

Implementation

Future<void> connectDevice(String deviceId) async {
  try {
    await _channel.invokeMethod('connectDevice', {'deviceId': deviceId});
  } on PlatformException catch (e) {
    throw Exception('连接设备失败: ${e.message}');
  }
}