Browse SDKs · Flutter
Platform
SDKsFlutter

Retrieve joined groups by page

Retrieve the list of groups joined by the current Flutter user with pagination.

Copy

Retrieve the list of groups the current logged-in user has joined in paginated batches, suitable for loading large numbers of groups incrementally.

Parameters

ParameterTypeRequiredDescription
offsetintNoStarting offset for pagination. Defaults to 0 for the first page.
countintNoMaximum number of groups to retrieve in a single page.

Code example

final groups = await OpenIM.iMManager.groupManager.getJoinedGroupListPage(
  offset: 0,
  count: 50,
);

Return value

Returns a Future resolving to a List<GroupInfo> containing the joined groups for the requested page.

When fetching subsequent pages, increment offset by the total number of items requested so far. Never calculate offsets using local list lengths that fluctuate with real-time events. If group events arrive while paging through the list, reset the offset and restart from the first page.

State changes after the call

This query retrieves a point-in-time snapshot and does not trigger event callbacks. For incremental group synchronization and state merging keyed by groupID, see Group overview.