create static method

Background create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "background",
  3. String special_return_type = "background",
  4. num? id,
  5. bool? is_default,
  6. bool? is_dark,
  7. String? name,
  8. Document? document,
  9. BackgroundType? type,
})
override

Generate By General Universe Script Dont edit by hand or anything manual

Implementation

static Background create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "background",
  String special_return_type = "background",
  num? id,
  bool? is_default,
  bool? is_dark,
  String? name,
  Document? document,
  BackgroundType? type,
}) {
  // Background background = Background({
  final Map background_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "id": id,
    "is_default": is_default,
    "is_dark": is_dark,
    "name": name,
    "document": (document != null) ? document.toJson() : null,
    "type": (type != null) ? type.toJson() : null,
  };

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

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