SDKsFlutter
Search joined groups
Search locally synchronized groups joined by the current user with the OpenIM Flutter SDK.
Search within the groups the current user has joined using group ID or group name keywords from local storage.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
keywordList | List<String> | Yes | List of search keywords. We recommend trimming whitespace before passing keywords. |
isSearchGroupID | bool | No | Whether to match group IDs against the keywords. |
isSearchGroupName | bool | No | Whether 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.
Was this page helpful?