formateSetSelfInfoParams static method

Object formateSetSelfInfoParams(
  1. Map<String, dynamic> params
)

Implementation

static Object formateSetSelfInfoParams(Map<String, dynamic> params) {
  final paramsMap = {};
  if (params["nickName"] != null) {
    paramsMap["nick"] = params["nickName"];
  }
  if (params["faceUrl"] != null) {
    paramsMap["avatar"] = params["faceUrl"];
  }
  if (params["gender"] != null) {
    paramsMap["gender"] = convertGenderFromDartToWeb(params["gender"]);
  }
  if (params["selfSignature"] != null) {
    paramsMap["selfSignature"] = params["selfSignature"];
  }
  if (params["allowType"] != null) {
    paramsMap["allowType"] =
        convertAllowTypeFromDartToWeb(params['allowType']);
  }
  if (params["level"] != null) {
    paramsMap["level"] = params["level"];
  }
  if (params["role"] != null) {
    paramsMap["role"] = params["role"];
  }
  if (params["birthday"] != null) {
    paramsMap["birthday"] = params["birthday"];
  }
  if (params["customInfo"] != null) {
    paramsMap["profileCustomField"] =
        convertCustomInfoFromDartToWeb(params['customInfo']);
  }
  return mapToJSObj(paramsMap);
}