toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final tree = _nodeRendering.renderTree(nodes);
  return {
    'page_id': pageID,
    'nodes': _nodeRendering
        .renderFlatList(tree)
        .map((e) => e.toJsonWithStabilIdAndPageIdAndId())
        .toList(),
  };
}