Block.fromJson constructor
Create a new Block instance from json.
Receive a json
from where the information is extracted.
Implementation
Block.fromJson(Map<String, dynamic> json)
: this.id = json['id'] ?? '',
this.hasChildren = json['has_children'] ?? false,
this.jsonContent = json['type'] != null ? json[json['type']] ?? {} : {},
this.type = stringToBlockType(json['type'] ?? ''),
super(
createdTime: json['created_time'] ?? '',
lastEditedTime: json['last_edited_time'] ?? '',
);