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?,
playlistId: json['playlistId'] as String?,
position: json['position'] as int?,
resourceId: json['resourceId'] == null
? null
: ResourceId.fromJson(json['resourceId'] as Map<String, dynamic>),
videoOwnerChannelTitle: json['videoOwnerChannelTitle'] as String?,
videoOwnerChannelId: json['videoOwnerChannelId'] as String?,
);