foldings property

Map<int, FoldRange?> get foldings

Map of all fold ranges detected in the document, keyed by start line index.

This map is automatically populated based on code structure (braces, indentation, etc.) when folding is enabled.

Implementation

Map<int, FoldRange?> get foldings => _foldings;
set foldings (Map<int, FoldRange?> value)

Set fold ranges in the editor

Implementation

set foldings(Map<int, FoldRange?> value) {
  _foldings = value;
  _rebuildFoldSortedCache();
}