create static method

YoutubeChannelFullInfo create({
  1. String? special_type,
  2. String? id,
  3. String? title,
  4. String? url,
  5. int? subscribers_count,
  6. String? profile_banner,
  7. String? profile_picture,
  8. String? description,
  9. int? view_count,
  10. String? join_date,
  11. String? country,
  12. List<YoutubeChannelThumbnails>? thumbnails,
  13. List<YoutubeChannelLinks>? channelLinks,
})
override

return original data json

Implementation

static YoutubeChannelFullInfo create({
  String? special_type,
  String? id,
  String? title,
  String? url,
  int? subscribers_count,
  String? profile_banner,
  String? profile_picture,
  String? description,
  int? view_count,
  String? join_date,
  String? country,
  List<YoutubeChannelThumbnails>? thumbnails,
  List<YoutubeChannelLinks>? channelLinks,
}) {
  YoutubeChannelFullInfo youtubeChannelFullInfo = YoutubeChannelFullInfo({
    "@type": special_type,
    "id": id,
    "title": title,
    "url": url,
    "subscribers_count": subscribers_count,
    "profile_banner": profile_banner,
    "profile_picture": profile_picture,
    "description": description,
    "view_count": view_count,
    "join_date": join_date,
    "country": country,
    "thumbnails": (thumbnails != null)
        ? thumbnails.map((res) => res.toJson()).toList().cast<Map>()
        : null,
    "channelLinks": (channelLinks != null)
        ? channelLinks.map((res) => res.toJson()).toList().cast<Map>()
        : null,
  });

  return youtubeChannelFullInfo;
}