create static method

YoutubeVideo create({
  1. String? special_type,
  2. String? id,
  3. String? author,
  4. String? channel_id,
  5. String? title,
  6. String? description,
  7. String? url,
  8. String? duration,
  9. int? date,
  10. bool? has_watch_page,
  11. bool? is_live,
  12. List<Object>? keywords,
  13. YoutubeVideoEngagement? engagement,
  14. YoutubeVideoThumbnails? thumbnails,
})
override

return original data json

Implementation

static YoutubeVideo create({
  String? special_type,
  String? id,
  String? author,
  String? channel_id,
  String? title,
  String? description,
  String? url,
  String? duration,
  int? date,
  bool? has_watch_page,
  bool? is_live,
  List<Object>? keywords,
  YoutubeVideoEngagement? engagement,
  YoutubeVideoThumbnails? thumbnails,
}) {
  YoutubeVideo youtubeVideo = YoutubeVideo({
    "@type": special_type,
    "id": id,
    "author": author,
    "channel_id": channel_id,
    "title": title,
    "description": description,
    "url": url,
    "duration": duration,
    "date": date,
    "has_watch_page": has_watch_page,
    "is_live": is_live,
    "keywords": keywords,
    "engagement": (engagement != null) ? engagement.toJson() : null,
    "thumbnails": (thumbnails != null) ? thumbnails.toJson() : null,
  });

  return youtubeVideo;
}