SDKsFlutter
Search friends
Search the current user’s friends with the OpenIM Flutter SDK.
final results = await OpenIM.iMManager.friendshipManager.searchFriends(
keywordList: [keyword.trim()],
isSearchUserID: true,
isSearchNickname: true,
isSearchRemark: true,
);Pass one non-empty keyword in keywordList. The remaining booleans control matching against the user ID, nickname, and friend remark. The Future returns List<SearchFriendsInfo>. Search results belong only to the current search UI; do not use them to replace the friend-list snapshot. The query does not trigger the friendship listener.
Was this page helpful?