getFriendGroups

Introduction

Load the list of friend groups with detailed information.

  1. You can get the whole list of friend groups, by specifying null to groupNameList.

Parameter details

Parameter name Parameter type Required Platform Description
groupNameList List< String > yes All The list of name of the groups that needs to get the detailed information.

Returned template

V2TimValueCallback<List<V2TimFriendGroup>>

{
    code : int
    desc : String
    data : List<V2TimFriendGroup>
}

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< V2TimFriendGroup > The list of friend groups result.

Code example

    V2TimValueCallback<List<V2TimFriendGroup>> getFriendGroupsRes =
        await TencentImSDKPlugin.v2TIMManager
            .getFriendshipManager()
            .getFriendGroups(groupNameList: []);
    if (getFriendGroupsRes.code == 0) {
      getFriendGroupsRes.data?.forEach((element) {
        element.friendCount;
        element.friendIDList;
        element.name;
      });
    }

results matching ""

    No results matching ""