dart-resolve-package-conflicts

Resolve Dart pub version conflicts using dart pub outdated and upgrade.

428|29|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/dart-lang/skills --skill dart-resolve-package-conflicts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dart-resolve-package-conflicts
Source: https://github.com/dart-lang/skills/tree/main/skills/dart-resolve-package-conflicts
Command: npx skills add https://github.com/dart-lang/skills --skill dart-resolve-package-conflicts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a guided workflow to diagnose and fix package version conflicts that occur when running dart pub get, ensuring a consistent dependency graph across your project.

Core Features & Use Cases

  • Audits dependencies with dart pub outdated to identify misalignments between current, upgradable, resolvable, and latest versions.
  • Upgrades and aligns constraints in pubspec.yaml, using careful precision to avoid breaking changes.
  • Resolves version conflicts with surgical edits to pubspec.lock when necessary, while maintaining reproducible builds.

Quick Start

Run the conflict-resolution workflow on your Dart project's pubspec.yaml to fix incompatible versions.

Frequently Asked Questions about dart-resolve-package-conflicts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Dart pub version conflicts when dart pub get fails?

Resolve Dart pub version conflicts by auditing dependencies with dart pub outdated, upgrading constraints in pubspec.yaml, and applying surgical edits to pubspec.lock to ensure a consistent dependency graph.

Why does dart pub get fail due to version constraints across transitive dependencies?

Dart pub get fails due to version constraints when misalignments exist between current, upgradable, resolvable, and latest versions across direct and transitive dependencies. Auditing dependencies with dart pub outdated helps identify these specific version misalignments.

What is the best way to upgrade pubspec.yaml constraints without breaking changes?

The best way to upgrade pubspec.yaml constraints without breaking changes is to carefully align version constraints using precision after auditing the current dependency graph. This ensures safe upgrades while maintaining reproducible builds across your Dart project.

Can I manually edit pubspec.lock to resolve Dart package conflicts?

Yes, you can surgically edit pubspec.lock to resolve Dart package conflicts when necessary. This approach allows you to resolve specific version conflicts while maintaining reproducible builds across your project environment.

Does resolving Dart pub conflicts work for projects with complex transitive dependencies?

Yes, resolving Dart pub conflicts works for projects with complex transitive dependencies. The workflow specifically applies when pub get fails due to version constraints across dependencies and transitive deps, ensuring a consistent dependency graph across builds.