disconnect method

  1. @override
Future<void> disconnect(
  1. String deviceAddress
)
override

Terminates the connection to a BLE peripheral. Initiates a connection to a BLE peripheral and returns a Stream representing the connection state.

Implementation

@override
Future<void> disconnect(String deviceAddress) async {
  _connectionControllers[deviceAddress]?.add(BleConnectionState.disconnected);
  _connectionStates[deviceAddress] = BleConnectionState.disconnected;
}