rejectConnection method
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;
}