PageBlockEmbeddedPost.fromJson constructor

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

Parse from a json

Implementation

factory PageBlockEmbeddedPost.fromJson(Map<String, dynamic> json) => PageBlockEmbeddedPost(
  url: json['url'],
  author: json['author'],
  authorPhoto: json['author_photo'] == null ? null : Photo.fromJson(json['author_photo']),
  date: json['date'],
  pageBlocks: List<PageBlock>.from((json['page_blocks'] ?? []).map((item) => PageBlock.fromJson(item)).toList()),
  caption: PageBlockCaption.fromJson(json['caption']),
);