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 {
  Map result = await _channel
      .invokeMethod(ChatMethodKeys.leaveChatRoom, {"roomId": roomId});
  try {
    ChatError.hasErrorFromResult(result);
  } on ChatError catch (e) {
    throw e;
  }
}