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