Browse SDKs · Flutter
SDKsFlutter

Track message sending progress

Configure the Flutter listener for message sending progress.

Copy

When sendMessage() uploads a media message, configure one sending-progress listener in your message state layer:

OpenIM.iMManager.messageManager.setMsgSendProgressListener(
  OnMsgSendProgressListener(
    onProgress: (clientMsgID, progress) {
      updateMessageUploadProgress(clientMsgID, progress);
    },
  ),
);

Use clientMsgID to associate progress with its message bubble. Do not match by file name or list position. Progress reaching 100 does not mean the message was sent successfully; use the sendMessage() Future as the final sending result.

The pinned Flutter SDK does not expose a method to remove this listener. Configure only one instance and isolate state from the previous account when switching accounts. For independent avatar or business-file uploads, see Upload a file.