leaveChatRoom method

Future<void> leaveChatRoom(
  1. String roomId
)

Leaves the chat room.

Param roomId The ID of the chat room to leave.

Throws A description of the exception. See ChatError.

Implementation

Future<void> leaveChatRoom(String roomId) async {
  try {
    Map result = await platform_interface.Client.instance.chatRoomManager
        .callNativeMethod(ChatMethodKeys.leaveChatRoom, {"roomId": roomId});
    ChatError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}