0Pricing
Dart Academy · Lesson

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 http

All lessons in this course

  1. Anatomy of pubspec.yaml
  2. Adding Dependencies With dart pub
  3. Imports, Exports, and Libraries
  4. Version Constraints and the Lockfile
← Back to Dart Academy