addUserToBlockList method Null safety
- String username
Adds a user to the block list. You can send messages to the users on the block list, but cannot receive messages from them.
Param username
The user to be added to the block list.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<void> addUserToBlockList(
String username,
) async {
Map req = {'username': username};
Map result = await _channel.invokeMethod(
ChatMethodKeys.addUserToBlockList,
req,
);
try {
EMError.hasErrorFromResult(result);
} on EMError catch (e) {
throw e;
}
}