Agent 1,205 installs

dart-resolve-package-conflicts

by dart-lang/skills

Workflow for fixing package version conflicts. Use this when `pub get` fails due to incompatible package versions.

Skill content

Managing Dart Dependencies

Contents

- Core Concepts

- Version Constraints

- Workflow: Auditing Dependencies

- Workflow: Upgrading Dependencies

- Workflow: Resolving Version Conflicts

- Examples

Core Concepts

Dart enforces a strict single-version rule for dependencies: a project and all its transitive dependencies must resolve to a single, shared version of any given package. This prevents runtime type mismatches but introduces the risk of "version lock."

To mitigate version lock, Dart relies on version constraints rather than pinned versions in the pubspec.yaml. The pubspec.lock file maintains the exact resolved versions for reproducible builds.