toJson method

Map<String, dynamic> toJson()

Serializes the Story without the state and currentPage to the Map.

Used to persist the Story.

Implementation

Map<String, dynamic> toJson() {
  return {
    'title': title,
    'description': description,
    'authors': authors,
    'root': root.toMap(),
    'year': year,
  };
}