Create a quote message
Create a quoted reply message with the OpenIM Flutter SDK.
Construct a reply message that references an existing message alongside a plain text response:
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | String | Yes | Body content of the reply message. |
quoteMsg | Message | Yes | The complete original message object being quoted. |
Code example
final message = await OpenIM.iMManager.messageManager.createQuoteMessage(
text: 'I agree with this proposal',
quoteMsg: originalMessage,
);The quoted original message should be obtained directly from your active message list, historical query results, or receive callbacks rather than constructed manually.
Return value
Returns a Future resolving to a quoted reply Message object ready for transmission. Its quote payload is stored in quoteElem.
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 the original message, and does not trigger new-message event callbacks. Once constructed, pass the returned Message instance to Send a message to deliver it to a direct or group conversation.
Was this page helpful?