foldAll method

void foldAll()

Folds all foldable regions in the document.

All detected fold ranges will be collapsed, hiding their contents.

Throws StateError if folding is not enabled or editor is not initialized.

Example:

controller.foldAll();

Implementation

void foldAll() {
  if (_foldAllCallback == null) {
    throw StateError('Folding is not enabled or editor is not initialized');
  }
  _foldAllCallback!();
}