You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 11, 2025. It is now read-only.
Currently, CodeCrafterController supports code folding through callbacks like setFoldAtCallback, but there is no public API to programmatically trigger folding or unfolding of all foldable regions.
This limitation makes it difficult to:
Implement "Collapse All" / "Expand All" buttons in an IDE-style UI.
Restore user fold states after reopening a file.
Provide shortcuts or automated folding behavior.
—
Feature Request
Please add public methods (or similar) to CodeCrafterController, e.g.:
dart
controller.collapseAll();
controller.expandAll();
controller.toggleFoldAtLine(int lineIndex);
Or a method such as setFoldStateForAll(bool folded).
These should update internal folding state and call refresh() to re-render.
Motivation / Use Case
I’m building a custom Flutter code editor and need UI buttons or keyboard shortcuts for “Collapse All / Expand All.”
Current Workaround
Limitation: only workaround is to redefine foldAt callback and call controller.refresh(), which isn’t ergonomic for UI actions.