Browse SDKs · Flutter
Platform
SDKsFlutter

Search joined groups

Search locally synchronized groups joined by the current user with the OpenIM Flutter SDK.

Copy

Search within the groups the current user has joined using group ID or group name keywords from local storage.

Parameters

ParameterTypeRequiredDescription
keywordListList<String>YesList of search keywords. We recommend trimming whitespace before passing keywords.
isSearchGroupIDboolNoWhether to match group IDs against the keywords.
isSearchGroupNameboolNoWhether to match group names against the keywords.

Code example

final groups = await OpenIM.iMManager.groupManager.searchGroups(
  keywordList: [keyword.trim()],
  isSearchGroupID: true,
  isSearchGroupName: true,
);

Return value

Returns a Future resolving to a List<GroupInfo> containing the joined groups that match the search criteria.

This method searches only joined groups that have already been synchronized to local storage; it does not query a global public group directory.

State changes after the call

This search 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.