declineInvitation method
- String userId
Declines a friend invitation.
Param userId
The user who sends the friend invitation.
Throws A description of the exception. See ChatError.
Implementation
Future<void> declineInvitation(String userId) async {
Map req = {'username': userId};
Map result = await _channel.invokeMethod(
ChatMethodKeys.declineInvitation,
req,
);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}