connect static method

void connect(
  1. ClingDevice device, {
  2. bool autoReconnect = true,
})

Implementation

static void connect(ClingDevice device, {bool autoReconnect = true}) async {
  if (!_sdkInitSuccess) {
    return;
  }
  cfg.autoReconnect = autoReconnect;
  // if (!(await WinBle.isPaired(device.id))) {
  //   await WinBle.pair(device.id);
  // }
  cfg.device = device;
  _currentConnect?.dispose();
  _currentConnect = _ClingConnect(device: device);
  await _currentConnect?.connect();
  // Future.delayed(Duration(seconds: 3)).then((value) {
  //   _write();
  // });
}