Browse SDKs · Flutter
SDKsFlutter

Search friends

Search the current user’s friends with the OpenIM Flutter SDK.

Copy
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.