pubspec_doctor library

Audits pubspec.yaml dependencies: finds unused packages and flags discontinued or stale ones using the pub.dev API.

Classes

AssetChecker
Checks declared assets against the file system and against string literals in the project's Dart code.
AssetFindings
Findings about the flutter: assets: section.
CodegenDetector
Detects packages that are used through code generation or tool configuration rather than through imports, so they are not falsely reported as unused.
DependencyOverride
A single entry under dependency_overrides:, either in pubspec.yaml or in pubspec_overrides.yaml.
Doctor
Orchestrates the checks: parses the pubspec, scans the project for package references, and queries pub.dev for the health of each hosted dependency.
DoctorConfig
Project-level configuration, loaded from pubspec_doctor.yaml in the project root or, if absent, from a top-level pubspec_doctor: section in pubspec.yaml:
DoctorOptions
Fixer
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.
HealthCheckError
OutdatedConstraint
A package whose declared constraint does not allow the latest release, e.g. ^0.13.0 in the pubspec while pub.dev is at 1.2.0.
PackageHealth
Health facts about a hosted package, as reported by the pub.dev API.
PackageReport
One diagnosed package inside a run: path is relative to the invocation root (. for the root itself).
PubApiClient
Minimal client for GET /api/packages/<name> on pub.dev.
PubspecInfo
Parsed view of a project's pubspec.yaml, limited to what the doctor needs: dependency names grouped by section and by source.
Report
The full diagnosis for one project.
SdkIncompatiblePackage
A package whose latest release cannot be used with the current Dart SDK.
StalePackage
A package whose latest release is older than the configured threshold.
UsageResult
Which packages a project references, split by where the reference lives.
UsageScanner
Finds which packages a project actually references.
WorkspaceDoctor
Runs the doctor over a single package, or over every member of a pub workspace when the root pubspec has a workspace: section.