getChatRoomInfo static method

Future getChatRoomInfo(
  1. String targetId,
  2. int memeberCount,
  3. int memberOrder
)

获取聊天室信息

targetId 聊天室 id

memeberCount 需要获取的聊天室成员个数 0<=memeberCount<=20

memberOrder 获取的成员加入聊天室的顺序,参见枚举 RCChatRoomMemberOrder

Implementation

static Future /*ChatRoomInfo*/ getChatRoomInfo(String targetId, int memeberCount, int memberOrder) async {
  if (memeberCount > 20) {
    memeberCount = 20;
  }
  Map map = {"targetId": targetId, "memeberCount": memeberCount, "memberOrder": memberOrder};
  Map resultMap = await _channel.invokeMethod(RCMethodKey.GetChatRoomInfo, map);
  // ignore: unnecessary_null_comparison
  if (resultMap == null) {
    return null;
  }
  return MessageFactory.instance!.map2ChatRoomInfo(resultMap);
}