setFriendListener
Introduction
Set the friendship listener.
This method will cover all the original friendship listeners.
Parameter details
Parameter name | Parameter type | Required | Platform | Description |
---|---|---|---|---|
listener | V2TimFriendshipListener | yes | All | The friendship listener to set. |
Returned template
void
Return value details
This function has no return value
Code example
V2TimFriendshipListener listener = V2TimFriendshipListener(
onBlackListAdd: (List<V2TimFriendInfo> infoList) async {
},
onBlackListDeleted: (List<String> userList) async {
},
onFriendApplicationListAdded:
(List<V2TimFriendApplication> applicationList) async {
},
onFriendApplicationListDeleted: (List<String> userIDList) async {
},
onFriendApplicationListRead: () async {
},
onFriendInfoChanged: (List<V2TimFriendInfo> infoList) async {
},
onFriendListAdded: (List<V2TimFriendInfo> users) async {
},
onFriendListDeleted: (List<String> userList) async {
},
);
TencentImSDKPlugin.v2TIMManager
.getFriendshipManager()
.setFriendListener(listener: listener);