Snippet.fromJson constructor
Snippet.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Snippet.fromJson(Map<String, dynamic> json) => Snippet(
publishedAt: json['publishedAt'] as String?,
channelId: json['channelId'] as String?,
title: json['title'] as String?,
description: json['description'] as String?,
thumbnails: json['thumbnails'] == null
? null
: Thumbnails.fromJson(json['thumbnails'] as Map<String, dynamic>),
channelTitle: json['channelTitle'] as String?,
tags: (json['tags'] as List<dynamic>).map((e) => e.toString()).toList(),
categoryId: json['categoryId'] as String?,
liveBroadcastContent: json['liveBroadcastContent'] as String?,
defaultLanguage: json['defaultLanguage'] as String?,
localized: json['localized'] == null
? null
: Localized.fromJson(json['localized'] as Map<String, dynamic>),
defaultAudioLanguage: json['defaultAudioLanguage'] as String?,
);