destroyChatRoom method

Future<void> destroyChatRoom(
  1. String roomId
)

Destroys a chat room.

Only the chat room owner can call this method.

Param roomId The chat room ID.

Throws A description of the exception. See ChatError.

Implementation

Future<void> destroyChatRoom(
  String roomId,
) async {
  Map req = {"roomId": roomId};
  Map result =
      await _channel.invokeMethod(ChatMethodKeys.destroyChatRoom, req);
  try {
    ChatError.hasErrorFromResult(result);
  } on ChatError catch (e) {
    throw e;
  }
}