fromGraphJson static method

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

Implementation

static Page fromGraphJson(Map<String, dynamic> json) {
  return Page(
    id: (json['node'] ?? {})['id'],
    handle: (json['node'] ?? {})['handle'],
    title: (json['node'] ?? {})['title'],
    url: (json['node'] ?? {})['url'],
    body: (json['node'] ?? {})['body'],
    bodySummary: (json['node'] ?? {})['bodySummary'],
    createdAt: DateTime.parse(((json['node'] ?? const {})['createdAt'])),
    updatedAt: DateTime.parse(((json['node'] ?? const {})['updatedAt'])),
  );
}