xcBlueToothConnectDevice<T> method

Future<bool> xcBlueToothConnectDevice<T>(
  1. String pid,
  2. String mac
)

Implementation

Future<bool> xcBlueToothConnectDevice<T>(String pid,String mac) async {
  final originResponse = await _api.xcBlueToothConnectDevice(pid,mac,ApiSeq.instance.getSeq());
  XCloudResponse<T> response =
  XCloudResponse.fromOriginResponse<T>(originResponse);
  if (!response.success) {
    return Future.error(XCloudAPIException(code: response.code,commandId: originResponse.commandId));
  }
  return Future.value(response.success);
}