deleteAllMessageAndConversation method

Future<void> deleteAllMessageAndConversation({
  1. bool clearServerData = false,
})

~english Clears all conversations and all messages in them. Param clearServerData Whether to clear the server data.

  • true: Clear the server data.
  • false: (default) Do not clear the server data. ~end

~chinese 清空所有会话和会话中的所有消息。 Param clearServerData 是否清空服务端数据。

  • true: 清空服务端数据。
  • false: (默认) 不清空服务端数据。 ~end

Implementation

Future<void> deleteAllMessageAndConversation(
    {bool clearServerData = false}) async {
  Map result = await ChatChannel.invokeMethod(
      ChatMethodKeys.deleteAllMessageAndConversation, {
    'clearServerData': clearServerData,
  });
  try {
    ChatError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}