void editPage(int index, Page page) { assert(!_paint, 'The document has already been saved.'); page.generate(this, index: index, insert: false); _pages.add(page); }