Snippet.fromJson constructor

Snippet.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Snippet.fromJson(Map<String, dynamic> json) => Snippet(
      publishedAt: json['publishedAt'] == null
          ? null
          : DateTime.parse(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?,
      localized: json['localized'] == null
          ? null
          : Localized.fromJson(json['localized'] as Map<String, dynamic>),
    );