create static method

BlogData create({
  1. String special_type = "blogData",
  2. String? title,
  3. String? description,
  4. String? content,
  5. List<String>? author_url_social_medias,
  6. List<BlogsData>? blogs,
  7. BlogFooterData? footer,
})
override

return original data json

Implementation

static BlogData create({
  String special_type = "blogData",
  String? logo,
  String? title,
  String? description,
  String? content,
  List<String>? author_url_social_medias,
  List<BlogsData>? blogs,
  BlogFooterData? footer,
}) {
  // BlogData blogData = BlogData({
  Map blogData_data_create_json = {
    "@type": special_type,
    "logo": logo,
    "title": title,
    "description": description,
    "content": content,
    "author_url_social_medias": author_url_social_medias,
    "blogs": (blogs != null) ? blogs.toJson() : null,
    "footer": (footer != null) ? footer.toJson() : null,
  };

  blogData_data_create_json.removeWhere((key, value) => value == null);
  BlogData blogData_data_create = BlogData(blogData_data_create_json);

  return blogData_data_create;
}