declineInvitation method Null safety
Declines a group invitation.
Param groupId
The group ID.
Param inviter
The username of the inviter.
Param reason
The reason of declining.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<void> declineInvitation(
String groupId,
String inviter, [
String? reason,
]) async {
Map req = {'groupId': groupId, 'inviter': inviter};
req.setValueWithOutNull('reason', reason);
Map result = await _channel.invokeMethod(
ChatMethodKeys.declineInvitationFromGroup, req);
try {
EMError.hasErrorFromResult(result);
} on EMError catch (e) {
throw e;
}
}