setSelfInfo method

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

Implementation

Future<dynamic> setSelfInfo(Map<String, dynamic> params) async {
  try {
    final formatedParams = V2TimProfile.formateSetSelfInfoParams(params);
    final res = await wrappedPromiseToFuture(
        V2TIMManagerWeb.timWeb!.updateMyProfile(formatedParams));
    final code = res.code;
    if (code == 0) {
      return CommonUtils.returnSuccessWithDesc("ok");
    } else {
      return CommonUtils.returnError('设置个人信息出错:$code');
    }
  } catch (error) {
    return CommonUtils.returnError(error.toString());
  }
}