disconnect method

Future<void> disconnect(
  1. String deviceId
)

Disconnects from the BLE device with the given deviceId.

deviceId - The identifier of the target device.

Disconnects the BLE device.

Implementation

Future<void> disconnect(String deviceId) async {
  try {
    await _bleConnectivityHandler.disconnect(deviceId);
  } catch (e) {
    _appLogger.error("Error disconnecting from device $deviceId: $e");
    rethrow;
  }
}