Fixer class

Applies fixes for a Report by editing pubspec.yaml (and pubspec_overrides.yaml) in place. Uses yaml_edit, so comments, ordering and formatting are preserved.

Safe fixes: remove unused dependencies, move wrongly promoted ones to the right section, and delete path/git dependency_overrides. Opt-in fix: bump constraints that do not allow the latest release (changes behavior, so it is separate).

Constructors

Fixer()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply(Directory root, Report report, {bool safe = true, bool outdated = false}) → List<String>
Returns human-readable descriptions of the edits that were applied.
deleteUnusedAssets(Directory root, Report report) → List<String>
Deletes asset files reported as possibly unused. Only files tracked by git are deleted, so every deletion is recoverable with git checkout; untracked files are skipped with a note.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited