getMembersOfGroup static method

Future<SearchResultOfGroupMemberResponse> getMembersOfGroup(
  1. HttpClient client,
  2. int currentpage,
  3. String groupId,
  4. RuntimeGroupMemberType memberType,
  5. String nameSearch,
)

Get the list of members in a given group.

Implementation

static Future<SearchResultOfGroupMemberResponse> getMembersOfGroup (
    HttpClient client,
    int currentpage,
    String groupId,
    RuntimeGroupMemberType memberType,
    String nameSearch,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _currentpage = '$currentpage';
    final String _groupId = '$groupId';
    params['memberType'] = memberType.value;
    params['nameSearch'] = nameSearch;
    final HttpClientConfig config = HttpClientConfig('GET', '/GroupV2/$_groupId/Members/', params);
    config.bodyContentType = null;
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return SearchResultOfGroupMemberResponse.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}