joinChatRoom method
Joins the chat room.
To exit the chat room, call leaveChatRoom.
Param roomId
The ID of the chat room to join.
Param leaveOtherRooms
Whether to leave other rooms.
Param ext
The extension information.
Throws A description of the exception. See ChatError.
Implementation
Future<void> joinChatRoom(
String roomId, {
bool leaveOtherRooms = false,
String? ext,
}) async {
Map result = await _channel.invokeMethod(ChatMethodKeys.joinChatRoom, {
"roomId": roomId,
"leaveOtherRooms": leaveOtherRooms,
"ext": ext ?? "",
});
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}