create static method

PageBlockEmbedded create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "pageBlockEmbedded",
  3. String special_return_type = "pageBlock",
  4. String? url,
  5. String? html,
  6. Photo? poster_photo,
  7. num? width,
  8. num? height,
  9. PageBlockCaption? caption,
  10. bool? is_full_width,
  11. bool? allow_scrolling,
})
override

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

Implementation

static PageBlockEmbedded create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "pageBlockEmbedded",
  String special_return_type = "pageBlock",
  String? url,
  String? html,
  Photo? poster_photo,
  num? width,
  num? height,
  PageBlockCaption? caption,
  bool? is_full_width,
  bool? allow_scrolling,
}) {
  // PageBlockEmbedded pageBlockEmbedded = PageBlockEmbedded({
  final Map pageBlockEmbedded_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "url": url,
    "html": html,
    "poster_photo": (poster_photo != null) ? poster_photo.toJson() : null,
    "width": width,
    "height": height,
    "caption": (caption != null) ? caption.toJson() : null,
    "is_full_width": is_full_width,
    "allow_scrolling": allow_scrolling,
  };

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

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