addNodeWithText method

void addNodeWithText(
  1. String text
)

Add a new node (paragraph) to the current page.

This is used by the Editor of the interactive fiction story. Should not be used in the 'reading' mode (when player reads the book).

Implementation

void addNodeWithText(String text) {
  var node = PageNode(text: text);
  nodes.add(node);
}