getBlackList
Introduction
Load the list of blocked users.
Parameter details
This API has no parameters
Returned template
V2TimValueCallback<List<V2TimFriendInfo>>
{
code : int
desc : String
data : List<V2TimFriendInfo>
}
Return value details
name | type | description |
---|---|---|
code | int | Request result: Error codes. 0 means success. |
desc | String | The description of the error. It will be empty if success. |
data | List< V2TimFriendInfo > | The list of blocked users. |
Code example
V2TimValueCallback<List<V2TimFriendInfo>> getBlackListRes =
await TencentImSDKPlugin.v2TIMManager
.getFriendshipManager()
.getBlackList();
if (getBlackListRes.code == 0) {
getBlackListRes.data?.forEach((element) {
element.friendCustomInfo;
element.friendGroups;
element.friendRemark;
element.userID;
element.userProfile?.allowType;
element.userProfile?.birthday;
element.userProfile?.customInfo;
element.userProfile?.faceUrl;
element.userProfile?.gender;
element.userProfile?.level;
element.userProfile?.nickName;
element.userProfile?.role;
element.userProfile?.selfSignature;
element.userProfile?.userID;
});
}