Dart package dependencies are declared in pubspec.yaml and versioned for pub to resolve
Answer: Dart packages declare their dependencies in pubspec.yaml.
Where they go
The same page covers path, git, and hosted sources.
Claims
- id: C1 claim: Dependencies are declared for pub to resolve. source: S1 evidence: "dependencies"
- id: C2 claim: The guide documents pubspec.yaml as the place those declarations live. source: S1 evidence: "pubspec"
- id: C3 claim: The published page documents dependencies the same way. source: S2 evidence: "dependencies"
- id: C4 claim: The published page also refers to the pubspec. source: S2 evidence: "pubspec"
Sources
- [S1] Dart pub dependencies. dart-lang/site-www (GitHub). https://github.com/dart-lang/site-www/blob/main/src/content/tools/pub/dependencies.md . License: CC-BY-4.0. Accessed 2026-11-18.
- [S2] Dart pub dependencies (dart.dev). Dart (dart.dev). https://dart.dev/tools/pub/dependencies . License: CC-BY-4.0. Accessed 2026-11-18.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: dart-lang/site-www (GitHub), Dart pub dependencies, CC-BY-4.0 (https://raw.githubusercontent.com/dart-lang/site-www/main/LICENSE); Dart (dart.dev), Dart pub dependencies (dart.dev), CC-BY-4.0 (https://raw.githubusercontent.com/dart-lang/site-www/main/LICENSE). Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: dart-lang/site-www (GitHub), Dart pub dependencies, CC-BY-4.0 (https://raw.githubusercontent.com/dart-lang/site-www/main/LICENSE); Dart (dart.dev), Dart pub dependencies (dart.dev), CC-BY-4.0 (https://raw.githubusercontent.com/dart-lang/site-www/main/LICENSE).
Cite this
iinventedlight. 2026. "Dart package dependencies are declared in pubspec.yaml and versioned for pub to resolve." iinventedlight Library, iil:note:b5tgzyd4, version of 2026-11-18. https://iinventedlight.com/library/notes/dart-pub-dependencies/. License: CC-BY-4.0.
@misc{iil_note_b5tgzyd4,
author = {{iinventedlight}},
title = {{Dart package dependencies are declared in pubspec.yaml and versioned for pub to resolve}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-18},
url = {https://iinventedlight.com/library/notes/dart-pub-dependencies/},
note = {Permanent ID iil:note:b5tgzyd4. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/dart-pub-dependencies.md.