disconnect method
Disconnects from the BLE device with the given id.
Implementation
Future<bool> disconnect(String id) {
_validateId(id, 'id');
return _mutex.protect(() async {
_desiredConnectedDevices.remove(id);
_statusSubscriptions[id]?.cancel();
_statusSubscriptions.remove(id);
_reconnectAttempts.remove(id);
return NexoraSdkPlatform.instance.disconnectDevice(id);
});
}