cj_addCustomParams method

String? cj_addCustomParams(
  1. Map<String, dynamic> addParams
)

为当前的 web url 添加其他额外参数(参数的值如果是对象,则会自动 jsonEncode)

Implementation

String? cj_addCustomParams(Map<String, dynamic> addParams) {
  String? addParamsString = WebUrlUtil.encodeParam(addParams);
  if (addParamsString == null || addParamsString.isEmpty) {
    return this;
  }

  if (contains('?')) {
    return "$this&$addParamsString";
  } else {
    return "$this?$addParamsString";
  }
}