Version Constraints and the Lockfile
Pin and resolve dependency versions.
Why Constraints Exist
A version constraint tells pub which releases of a package your project accepts. It balances getting fixes with avoiding breaking changes. 🎯
http: ^1.2.0Semantic Versioning
Dart packages follow semantic versioning: major.minor.patch. A major bump signals breaking changes, minor adds features, patch fixes bugs.
version: 2.4.1All lessons in this course
- Anatomy of pubspec.yaml
- Adding Dependencies With dart pub
- Imports, Exports, and Libraries
- Version Constraints and the Lockfile