declineInvitation method

Future<void> declineInvitation(
  1. String username
)

Declines a friend invitation.

Param username The user who sends the friend invitation.

Throws A description of the exception. See ChatError.

Implementation

Future<void> declineInvitation(String username) async {
  Map req = {'username': username};
  Map result =
      await _channel.invokeMethod(ChatMethodKeys.declineInvitation, req);
  try {
    ChatError.hasErrorFromResult(result);
  } on ChatError catch (e) {
    throw e;
  }
}