PlaylistItemSnippet.fromJson constructor

PlaylistItemSnippet.fromJson(
  1. Map json_
)

Implementation

PlaylistItemSnippet.fromJson(core.Map json_)
    : this(
        channelId: json_.containsKey('channelId')
            ? json_['channelId'] as core.String
            : null,
        channelTitle: json_.containsKey('channelTitle')
            ? json_['channelTitle'] as core.String
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        playlistId: json_.containsKey('playlistId')
            ? json_['playlistId'] as core.String
            : null,
        position: json_.containsKey('position')
            ? json_['position'] as core.int
            : null,
        publishedAt: json_.containsKey('publishedAt')
            ? core.DateTime.parse(json_['publishedAt'] as core.String)
            : null,
        resourceId: json_.containsKey('resourceId')
            ? ResourceId.fromJson(
                json_['resourceId'] as core.Map<core.String, core.dynamic>)
            : null,
        thumbnails: json_.containsKey('thumbnails')
            ? ThumbnailDetails.fromJson(
                json_['thumbnails'] as core.Map<core.String, core.dynamic>)
            : null,
        title:
            json_.containsKey('title') ? json_['title'] as core.String : null,
        videoOwnerChannelId: json_.containsKey('videoOwnerChannelId')
            ? json_['videoOwnerChannelId'] as core.String
            : null,
        videoOwnerChannelTitle: json_.containsKey('videoOwnerChannelTitle')
            ? json_['videoOwnerChannelTitle'] as core.String
            : null,
      );