Browse SDKs · Flutter
SDKsFlutter

Clear all messages

Use the Flutter SDK to clear all local and server-side messages for the current account.

Copy
await OpenIM.iMManager.messageManager.deleteAllMsgFromLocalAndSvr();
clearLocalMessageState();

Require a second confirmation before running this operation. Future completion does not mean that other devices have already cleared their state, and it does not delete copies retained by other conversation members. Reset the complete message snapshot, then reconcile conversation summaries and unread counts through conversation listeners or fresh queries.