rejectConnection method

Future<bool> rejectConnection(
  1. String endpointId
)

Reject Connection

To be called by both discoverer and advertiser

Call this in OnConnectionInitiated to reject an incoming connection

OnConnectionResult is called on both even if one of them rejects the connection

Implementation

Future<bool> rejectConnection(String endpointId) async {
  return await _channel.invokeMethod(
        'rejectConnection',
        <String, dynamic>{
          'endpointId': endpointId,
        },
      ) ??
      false;
}