utils/pubspec_sorter library
Classes
- KeyEntry
- Represents a key entry extracted from the pubspec content
- NestedKeyEntry
- Represents a nested key entry (for dependency sections)
Functions
-
sortPubspec(
String content) → String - Sorts pubspec.yaml content according to standard key order. Preserves comments (inline and standalone). Sorts package names alphabetically within dependency sections ONLY. Other nested maps (flutter, executables, etc.) are preserved as-is.