rejectConnection method

Future<void> rejectConnection(
  1. String endpointId
)

Rejects a pending connection

Implementation

Future<void> rejectConnection(String endpointId) async {
  var pending = _findDevice(pendingAcceptConnections, endpointId);
  if (pending == null) {
    return;
  }

  await nearbyCross.rejectConnection(endpointId);
  pendingAcceptConnections.remove(pending);

  _executeCallback(callbackConnectionRejected, pending);
}