Post.fromJson constructor

Post.fromJson(
  1. Map json_
)

Implementation

Post.fromJson(core.Map json_)
    : this(
        author: json_.containsKey('author')
            ? PostAuthor.fromJson(
                json_['author'] as core.Map<core.String, core.dynamic>)
            : null,
        blog: json_.containsKey('blog')
            ? PostBlog.fromJson(
                json_['blog'] as core.Map<core.String, core.dynamic>)
            : null,
        content: json_.containsKey('content')
            ? json_['content'] as core.String
            : null,
        customMetaData: json_.containsKey('customMetaData')
            ? json_['customMetaData'] as core.String
            : null,
        etag: json_.containsKey('etag') ? json_['etag'] as core.String : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        images: json_.containsKey('images')
            ? (json_['images'] as core.List)
                .map((value) => PostImages.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        location: json_.containsKey('location')
            ? PostLocation.fromJson(
                json_['location'] as core.Map<core.String, core.dynamic>)
            : null,
        published: json_.containsKey('published')
            ? json_['published'] as core.String
            : null,
        readerComments: json_.containsKey('readerComments')
            ? json_['readerComments'] as core.String
            : null,
        replies: json_.containsKey('replies')
            ? PostReplies.fromJson(
                json_['replies'] as core.Map<core.String, core.dynamic>)
            : null,
        selfLink: json_.containsKey('selfLink')
            ? json_['selfLink'] as core.String
            : null,
        status: json_.containsKey('status')
            ? json_['status'] as core.String
            : null,
        title:
            json_.containsKey('title') ? json_['title'] as core.String : null,
        titleLink: json_.containsKey('titleLink')
            ? json_['titleLink'] as core.String
            : null,
        trashed: json_.containsKey('trashed')
            ? json_['trashed'] as core.String
            : null,
        updated: json_.containsKey('updated')
            ? json_['updated'] as core.String
            : null,
        url: json_.containsKey('url') ? json_['url'] as core.String : null,
      );