destroyChatThread method

Future<void> destroyChatThread(
  1. {required String chatThreadId}

Disband Chat Thread.

Group owner and group administrator to which the Chat Thread belongs have permission. After chat thread is disbanded, there will be the following notification:

  1. Members of the organization (group) to which chat thread belongs will receive the disbanded notification event, and can listen to related events by setting ChatThreadEventHandler. The event callback function is ChatThreadEventHandler.onChatThreadDestroy.
  2. Multiple devices will receive the notification event and you can set ChatMultiDeviceEventHandler to listen on the event. The event callback function is ChatMultiDeviceEventHandler.onChatThreadEvent, where the first parameter is the event, for example, ChatMultiDevicesEvent.CHAT_THREAD_DESTROY for the chat thread destruction event.

Param chatThreadId Chat Thread ID.

Throws A description of the exception. See ChatError.


Future<void> destroyChatThread({
  required String chatThreadId,
}) async {
  Map req = {
    "threadId": chatThreadId,
  Map result = await _channel.invokeMethod(
  try {
  } on ChatError catch (e) {
    throw e;