searchGroupMembers

Introduction

Search group members by keyword.

This method could search the group members cached in local storage, according to the keywords provided, supports searching with nickName, remark, user ID and name card.

Supports since version 3.8.0, do not works with AVChatRoom.

Parameter details

Parameter name Parameter type Required Platform Description
param V2TimGroupMemberSearchParam yes All The list of keywords of searching, upper limit is 5 keywords.

Returned template

V2TimValueCallback<V2GroupMemberInfoSearchResult>

{
    code : int
    desc : String
    data : {
        groupMemberSearchResultItems :  Map<String, dynamic>// 群成员搜索结果
    }
}

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 V2GroupMemberInfoSearchResult The search result list.

Code example

    V2TimGroupMemberSearchParam param = V2TimGroupMemberSearchParam(
        groupIDList: [],
        isSearchMemberNameCard: true,
        isSearchMemberRemark: true,
        isSearchMemberNickName: true,
        isSearchMemberUserID: true,
        keywordList: []);
    V2TimValueCallback<V2GroupMemberInfoSearchResult> searchGroupMembersRes =
        await TencentImSDKPlugin.v2TIMManager
            .getGroupManager()
            .searchGroupMembers(param: param); 
    if (searchGroupMembersRes.code == 0) {
      searchGroupMembersRes.data?.groupMemberSearchResultItems;
    }

results matching ""

    No results matching ""