toMap method

Map<String, dynamic> toMap()

Used to serialize Page instance to map for persistence.

Does not save the state of the Page.

Implementation

Map<String, dynamic> toMap() {
  return {
    'endType': endTypeToString(endType),
    'next': next.map((n) => n.toMap()).toList(),
    'nodes': nodes.map((n) => n.toMap()).toList(),
  };
}