create static method

OptionValue create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "optionValue",
  3. bool special_is_json_scheme_class = true,
  4. String special_return_type = "optionValue",
  5. OptionValueBoolean? option_value_boolean,
  6. OptionValueEmpty? option_value_empty,
  7. OptionValueInteger? option_value_integer,
  8. OptionValueString? option_value_string,
})
override

Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual

Implementation

static OptionValue create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "optionValue",
  bool special_is_json_scheme_class = true,
  String special_return_type = "optionValue",
  OptionValueBoolean? option_value_boolean,
  OptionValueEmpty? option_value_empty,
  OptionValueInteger? option_value_integer,
  OptionValueString? option_value_string,
}) {
  // OptionValue optionValue = OptionValue({
  final Map optionValue_data_create_json = {
    "@type": special_type,
    "@is_json_scheme_class": special_is_json_scheme_class,
    "@return_type": special_return_type,
    "option_value_boolean": (option_value_boolean != null) ? option_value_boolean.toJson() : null,
    "option_value_empty": (option_value_empty != null) ? option_value_empty.toJson() : null,
    "option_value_integer": (option_value_integer != null) ? option_value_integer.toJson() : null,
    "option_value_string": (option_value_string != null) ? option_value_string.toJson() : null,
  };

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

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