// Set the search parameter
V2TimGroupMemberSearchParam param = V2TimGroupMemberSearchParam(
groupIDList: [],// Set the group ID list. If null is passed in, group members of all groups are searched.
isSearchMemberNameCard: true,// Specify whether to search for a group member's name card. Default value: `true`.
isSearchMemberRemark: true,// Specify whether to search for a group member's remarks. Default value: `true`.
isSearchMemberNickName: true,// Specify whether to search for a group member's nickname. Default value: `true`.
isSearchMemberUserID: true,// Specify whether to search for a group member's `userID`. Default value: `true`.
keywordList: []);// Search for the list of keywords. Up to five keywords are supported.
// Search for a group member
V2TimValueCallback<V2GroupMemberInfoSearchResult> searchGroupMembersRes =
await TencentImSDKPlugin.v2TIMManager
.getGroupManager()
.searchGroupMembers(param: param); // Parameter for searching for a group member
if (searchGroupMembersRes.code == 0) {
// Data found successfully
searchGroupMembersRes.data?.groupMemberSearchResultItems;// Group member search result
}
Was this page helpful?