joinChatRoom method
~english Joins the chat room.
To exit the chat room, call leaveChatRoom.
Param roomId
The ID of the chat room to join.
Param leaveOther
Whether to leave all the currently joined chat rooms when joining a chat room.
Param ext
The extension information.
Throws A description of the exception. See EMError. ~end
~chinese 加入聊天室
退出聊天室,调用 leaveChatRoom.
Param roomId
要加入的聊天室ID。
Parm leaveOther
加入聊天室时候,是否退出已加入的聊天室。
Param ext
扩展信息。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 EMError。 ~end
Implementation
Future<void> joinChatRoom(
String roomId, {
bool leaveOther = true,
String? ext,
}) async {
return Client.instance.chatRoomManager.joinChatRoom(
roomId,
leaveOther: leaveOther,
ext: ext,
);
}