Browse SDKs · Flutter
Platform
SDKsFlutterEnterprise

Load newer message history

Use the Flutter SDK to page from a message anchor toward newer message history.

Copy

Page forward from a specific message anchor (such as after searching or jumping to a quoted message) toward newer message history:

Parameters

ParameterTypeRequiredDescription
conversationIDStringYesTarget conversation ID.
startMsgMessage?NoStarting anchor message for reverse pagination. Loads messages created after this anchor.
countintYesNumber of messages to retrieve in this batch.
viewTypeint?NoHistory view type, defaulting to normal history (GetHistoryViewType.history).

Code example

final page = await OpenIM.iMManager.messageManager
    .getAdvancedHistoryMessageListReverse(
  conversationID: conversationID,
  startMsg: anchorMessage,
  count: 30,
  viewType: GetHistoryViewType.history,
);

Avoid mixing forward and reverse cursor directions on the same scrolling boundary to prevent timeline rendering discontinuities.

Return value

Returns a Future resolving to an advanced message pagination object (AdvancedMessage). Its messageList contains messages retrieved forward toward the newest timestamp.

State changes after the call

This query retrieves a point-in-time snapshot and does not trigger new-message event callbacks. When merging into your UI list, constrain updates to the target conversationID and deduplicate records strictly by non-empty clientMsgID. To load older historical messages while scrolling upward, see Load older messages.