addGroupListener

Introduction

Add a group listener.

This method could add a new group listener, for the changes of group infos, to the array of listeners.

Parameter details

Parameter name Parameter type Required Platform Description
listener V2TimGroupListener yes All The group listener.

Returned template

void

Return value details

This function has no return value

Code example

    V2TimGroupListener listener = V2TimGroupListener(
      onApplicationProcessed: (String groupID, V2TimGroupMemberInfo opUser,
          bool isAgreeJoin, String opReason) async {
      },
      onGrantAdministrator: (String groupID, V2TimGroupMemberInfo opUser,
          List<V2TimGroupMemberInfo> memberList) async {
      },
      onGroupAttributeChanged:
          (String groupID, Map<String, String> groupAttributeMap) async {
      },
      onGroupCreated: (String groupID) async {
      },
      onGroupDismissed: (String groupID, V2TimGroupMemberInfo opUser) async {
      },
      onGroupInfoChanged:
          (String groupID, List<V2TimGroupChangeInfo> changeInfos) async {
      },
      onGroupRecycled: (String groupID, V2TimGroupMemberInfo opUser) async {
      },
      onMemberEnter:
          (String groupID, List<V2TimGroupMemberInfo> memberList) async {
      },
      onMemberInfoChanged: (String groupID,
          List<V2TimGroupMemberChangeInfo>
              v2TIMGroupMemberChangeInfoList) async {
      },
      onMemberInvited: (String groupID, V2TimGroupMemberInfo opUser,
          List<V2TimGroupMemberInfo> memberList) async {
      },
      onMemberKicked: (String groupID, V2TimGroupMemberInfo opUser,
          List<V2TimGroupMemberInfo> memberList) async {
      },
      onMemberLeave: (String groupID, V2TimGroupMemberInfo member) async {
      },
      onQuitFromGroup: (String groupID) async {
      },
      onReceiveJoinApplication:
          (String groupID, V2TimGroupMemberInfo member, String opReason) async {
      },
      onReceiveRESTCustomData: (String groupID, String customData) async {
      },
      onRevokeAdministrator: (String groupID, V2TimGroupMemberInfo opUser,
          List<V2TimGroupMemberInfo> memberList) async {
      },
    );
    TencentImSDKPlugin.v2TIMManager.addGroupListener(listener: listener);

results matching ""

    No results matching ""