acceptConnection method

Future<void> acceptConnection(
  1. String endpointId
)

Accepts a pending connection

Implementation

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

  var device = addDeviceAsInitiatedConnection(pending);

  await nearbyCross.acceptConnection(endpointId);

  _executeCallback(callbackConnectionInitiated, device);
}