close method
Closes the connection. Idempotent.
Implementation
@override
Future<void> close() async {
if (_closed) return;
_closed = true;
_current = BleConnectionState.disconnected;
if (!_state.isClosed) {
_state.add(BleConnectionState.disconnected);
await _state.close();
}
for (final c in _notify.values) {
if (!c.isClosed) await c.close();
}
}