getGroupMembersInfo method

Future getGroupMembersInfo(
  1. Map<String, dynamic> params
)

Implementation

Future<dynamic> getGroupMembersInfo(Map<String, dynamic> params) async {
  try {
    final getMembersInfoParams = GetGroupMembersInfo.formatParams(params);
    final res = await wrappedPromiseToFuture(
        timeweb!.getGroupMemberProfile(getMembersInfoParams));
    if (res.code == 0) {
      final memberList = jsToMap(res.data)['memberList'];
      final memberListResult =
          GetGroupMemberList.formateGroupResult(memberList);
      return CommonUtils.returnSuccess<List<V2TimGroupMemberFullInfo>>(
          memberListResult);
    } else {
      return CommonUtils.returnErrorForValueCb<
          List<V2TimGroupMemberFullInfo>>('get group members info failed');
    }
  } catch (error) {
    return CommonUtils.returnErrorForValueCb<List<V2TimGroupMemberFullInfo>>(
        error);
  }
}