activeDocument property

TabbedDocument? get activeDocument

get active document if available or null if no document available.

Implementation

TabbedDocument? get activeDocument {
  if (_activeDocument >= 0 && _activeDocument <= _documents.length) {
    return _documents[_activeDocument];
  }
  return null;
}
set activeDocument (TabbedDocument? document)

update active document index

Implementation

set activeDocument(TabbedDocument? document) {
  for (int a = 0; a < _documents.length; a++) {
    if (_documents[a] == document) {
      _activeDocument = a;
      if (onRefresh != null) {
        onRefresh!(documents);
      }
      break;
    }
  }
}