SDKsFlutterEnterprise
Query conversations in group
Paginate conversations contained within a specified conversation group using the OpenIM Flutter SDK.
Retrieve conversation group metadata and its member conversations using pagination:
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | String | Yes | Target conversation group ID (conversationGroupID, not a chat group ID). |
pagination | RequestPagination | Yes | Pagination options. pageNumber starts at 1; showNumber specifies items per page. |
Code example
final page = await OpenIM.iMManager.conversationGroupManager
.getConversationGroupInfoWithConversations(
req: GetConversationGroupInfoWithConversationsReq(
groupID: conversationGroupID,
pagination: RequestPagination(pageNumber: 1, showNumber: 20),
),
);
renderConversationGroup(page.group, page.conversationElems ?? const []);Return value
A successful Future returns a paginated container object with group metadata and conversation items:
| Field | Type | Description |
|---|---|---|
group | ConversationGroupInfo? | Current conversation group metadata. |
conversationElems | List<ConversationInfo>? | List of conversations on the requested page. |
isEnd | bool? | Whether the last page has been reached; use this flag to stop further pagination. |
This query returns an immediate data snapshot and does not emit event notifications. If group or member change events arrive while browsing, reload the active page upon completing the current request. For complete event listening, see Conversation groups overview.
Was this page helpful?