removeConnectedDevices method

Device? removeConnectedDevices(
  1. String endpointId
)

Implementation

Device? removeConnectedDevices(String endpointId) {
  Device? device = _findDevice(connectedDevices, endpointId);
  if (device == null) {
    logger.e(
        "Could not find a initiated connection from endpointID $endpointId");
    return device;
  }

  connectedDevices.remove(device);
  logger.i("Device $endpointId disconnected");
  return device;
}