Browse SDKs · Flutter
SDKsFlutter

Delete a message

Use the Flutter SDK to delete one message from a conversation for the current account.

Copy
await OpenIM.iMManager.messageManager.deleteMessageFromLocalAndSvr(
  conversationID: conversationID,
  clientMsgID: clientMsgID,
);

Future completion does not mean that copies on other devices or held by other members have been deleted, and this operation is not a recall. The pinned Flutter SDK does not expose a batch synchronized-deletion API.

onMsgDeleted is the event owned by this page. Add it to the application's single OnAdvancedMsgListener. Because Flutter's Message has no conversationID, resolve the message route first, then remove it idempotently by conversationID:clientMsgID. See Event overview for the listener configuration entry point.