fromGraphJson static method

Article fromGraphJson(
  1. Map<String, dynamic> json
)

Implementation

static Article fromGraphJson(Map<String, dynamic> json) {
  return Article(
    author: AuthorV2.fromJson(
        ((json['node'] ?? const {})['authorV2']) ?? const {}),
    commentList:
        _getCommentList((json['node'] ?? const {})['comments'] ?? const {}),
    content: (json['node'] ?? const {})['content'],
    contentHtml: (json['node'] ?? const {})['contentHtml'],
    excerpt: (json['node'] ?? const {})['excerpt'],
    excerptHtml: (json['node'] ?? const {})['excerptHtml'],
    handle: (json['node'] ?? const {})['handle'],
    id: (json['node'] ?? const {})['id'],
    image: ShopifyImage.fromJson(
        (json['node'] ?? const {})['image'] ?? const {}),
    publishedAt: (json['node'] ?? const {})['publishedAt'],
    tags: _getTagsList(json),
    title: (json['node'] ?? const {})['title'],
    url: (json['node'] ?? const {})['url'],
  );
}