deleteAllMessageAndConversation method
- bool clearServerData = false,
Clears all conversations and all messages in them.
Param clearServerData Whether to clear all conversations and all messages in them on the server.
- true: Yes. All conversations and all messages in them will be cleared on the server side. The current user cannot retrieve messages and conversations from the server, while this has no impact on other users.
- (Default) falseļ¼No. All local conversations and all messages in them will be cleared, while those on the server remain.
Implementation
Future<void> deleteAllMessageAndConversation(
{bool clearServerData = false}) async {
try {
Map result = await platform_interface.Client.instance.chatManager
.callNativeMethod(ChatMethodKeys.deleteAllMessageAndConversation, {
'clearServerData': clearServerData,
});
ChatError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}