create static method

Error create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "error",
  3. String special_extra = "",
})
override

Generated By General Library Documentation Undocument By General Corporation & Global Corporation & General Developer

Implementation

static Error create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "error",
  String special_extra = "",
}) {
  // Error error = Error({
  final Map error_data_create_json = {
    "@type": special_type,
    "@extra": special_extra,
  };

  error_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (error_data_create_json.containsKey(key) == false) {
        error_data_create_json[key] = value;
      }
    });
  }
  return Error(error_data_create_json);
}