getGroupAttributes method

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

Implementation

Future<dynamic> getGroupAttributes(Map<String, dynamic> params) async {
  try {
    final getroupAttributesParams = GetGroupAttributes.formateParams(params);
    final res = await wrappedPromiseToFuture(
        timeweb!.getGroupAttributes(getroupAttributesParams));
    if (res.code == 0) {
      return CommonUtils.returnSuccess<Map<String, String>>(
          jsToMap(jsToMap(res.data)['groupAttributes']));
    }

    return CommonUtils.returnErrorForValueCb<Map<String, String>>(
        'transfer group member failed');
  } catch (error) {
    return CommonUtils.returnErrorForValueCb<Map<String, String>>(
        error.toString());
  }
}