addDocument method

void addDocument(
  1. TabbedDocument document
)

add a document to the end of the list and set it as active document.

Implementation

void addDocument(TabbedDocument document) {
  _documents.add(document);
  _activeDocument = _documents.length - 1;
  if (onRefresh != null) {
    onRefresh!(documents);
  }
}