Browse SDKs · Flutter
Platform
SDKsFlutter

Create a forward message

Create a single forwarded message with the OpenIM Flutter SDK.

Copy

Forward an existing valid message to another direct or group conversation by constructing a forward message object:

Parameters

ParameterTypeRequiredDescription
messageMessageYesThe complete original message object to forward.

Code example

final message = await OpenIM.iMManager.messageManager
    .createForwardMessage(message: sourceMessage);

The original message to forward must be a successfully delivered, authentic message record. The SDK assigns a new clientMsgID to the forwarded message; the source message remains unmodified.

Return value

Returns a Future resolving to a newly constructed Message object ready for transmission.

State changes after the call

Creating a message only constructs the local message data structure in memory; it does not perform network transmission, does not modify original message states, and does not trigger new-message event callbacks. Once constructed, pass the returned Message instance to Send a message to deliver it to the target conversation.