Adding Dependencies With dart pub
Fetch and version external packages.
The dart pub Command
The dart pub command is your package manager. It fetches, adds, and updates the external code your project relies on. 📦
Adding a Package
The fastest way to add a dependency is dart pub add. It edits pubspec.yaml for you and downloads the package in one step.
dart pub add httpAll lessons in this course
- Anatomy of pubspec.yaml
- Adding Dependencies With dart pub
- Imports, Exports, and Libraries
- Version Constraints and the Lockfile