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)

Use the setter to update this map — it rebuilds internal sorted caches used for O(log n) fold-region lookups.

Implementation

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