searchFriends
功能介绍
搜索好友
参数详解
返回值
V2TimValueCallback<List<V2TimFriendInfoResult>>
{
code : int
desc : String
data : List<V2TimFriendInfoResult>
}
返回值详解
代码示例
V2TimFriendSearchParam searchParam = V2TimFriendSearchParam(
isSearchNickName: true,
isSearchRemark: true,
isSearchUserID: true,
keywordList: [],
);
V2TimValueCallback<List<V2TimFriendInfoResult>> searchFriendsRes =
await TencentImSDKPlugin.v2TIMManager
.getFriendshipManager()
.searchFriends(searchParam: searchParam);
if (searchFriendsRes.code == 0) {
searchFriendsRes.data?.forEach((element) {
element.relation;
element.resultCode;
element.resultInfo;
element.friendInfo
?.friendCustomInfo;
element.friendInfo?.friendGroups;
element.friendInfo?.friendRemark;
element.friendInfo?.userID;
element.friendInfo?.userProfile
?.allowType;
element.friendInfo?.userProfile?.birthday;
element.friendInfo?.userProfile?.customInfo;
element.friendInfo?.userProfile?.faceUrl;
element.friendInfo?.userProfile?.gender;
element.friendInfo?.userProfile?.level;
element.friendInfo?.userProfile?.nickName;
element.friendInfo?.userProfile?.role;
element.friendInfo?.userProfile?.selfSignature;
element.friendInfo?.userProfile?.userID;
});
}