fetchChatRoomBlockList method

Future<List<String>> fetchChatRoomBlockList(
  1. String roomId,
  2. {int pageNum = 1,
  3. int pageSize = 200}

Gets the chat room block list with pagination.

Only the chat room owner or admin can call this method.

Param roomId The chat room ID.

Param pageNum The page number, starting from 1.

Param pageSize The number of users on the block list per page.

Return The list of the blocked chat room members.

Throws A description of the exception. See ChatError.


Future<List<String>> fetchChatRoomBlockList(
  String roomId, {
  int pageNum = 1,
  int pageSize = 200,
}) async {
  Map req = {"roomId": roomId, "pageNum": pageNum, "pageSize": pageSize};
  Map result =
      await _channel.invokeMethod(ChatMethodKeys.fetchChatRoomBlockList, req);
  try {
    return result[ChatMethodKeys.fetchChatRoomBlockList]?.cast<String>() ??
  } on ChatError catch (e) {
    throw e;