removeFriendListener

Introduction

Remove friendship listener.

  1. It will remove all the listeners, if no specific listener been provided.

Parameter details

Parameter name Parameter type Required Platform Description
listener V2TimFriendshipListener no All The listener to remove.

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()
        .addFriendListener(listener: listener);
    TencentImSDKPlugin.v2TIMManager
        .getFriendshipManager()
        .removeFriendListener(listener: listener);

results matching ""

    No results matching ""