Browse SDKs · Flutter
Platform
SDKsFlutterEnterprise

Retrieve conversations in a group

Retrieve conversations in a Flutter conversation group by page.

Copy

Use getConversationGroupInfoWithConversations() to retrieve a conversation group together with one page of its current conversation details.

final page = await OpenIM.iMManager.conversationGroupManager
    .getConversationGroupInfoWithConversations(
  req: GetConversationGroupInfoWithConversationsReq(
    groupID: conversationGroupID,
    pagination: RequestPagination(pageNumber: 1, showNumber: 20),
  ),
);

renderConversationGroup(page.group, page.conversationElems ?? const []);

In this request, groupID means conversationGroupID. pageNumber starts at 1, and showNumber is the page size.

Result

The response provides nullable group, the current page in conversationElems, and isEnd; it does not contain conversationTotal. Use isEnd to determine when pagination is complete.

This query does not trigger the group listener. If changes occur while paging, query again after loading to reconcile the snapshot.