fetchChatRoomMembers method

Future<ChatCursorResult<String>> fetchChatRoomMembers(
  1. String roomId,
  2. {String? cursor,
  3. int pageSize = 200}

Gets the chat room member list.

Param roomId The chat room ID.

Param cursor The cursor position from which to start getting data.

Param pageSize The number of members per page.

Return The list of chat room members. See ChatCursorResult. If ChatCursorResult.cursor is an empty string (""), all data is fetched.

Throws A description of the exception. See ChatError.


Future<ChatCursorResult<String>> fetchChatRoomMembers(
  String roomId, {
  String? cursor,
  int pageSize = 200,
}) async {
  Map req = {"roomId": roomId, "pageSize": pageSize};
  req.putIfNotNull("cursor", cursor);
  Map result =
      await _channel.invokeMethod(ChatMethodKeys.fetchChatRoomMembers, req);
  try {
    return ChatCursorResult<String>.fromJson(
        dataItemCallback: (obj) => obj);
  } on ChatError catch (e) {
    throw e;