The Dart pub homepage
Score8.0
Rank#20 of 93
Free planNo
Runs onLinux, macOS, Windows

Summary

Dart pub is the package manager for finding and managing shared libraries and tools for Dart. It resolves compatible package versions for your project and installed Dart SDK, with selected versions recorded in a lockfile so teams can keep application dependencies consistent. Packages can come from pub.dev, other hosted repositories, Git repositories, local paths, or supported SDKs. Use it from the Dart or Flutter command-line tools, or through package workflows in Dart-aware IDEs. Pub can publish packages to pub.dev, but packages published there cannot depend on Git or local paths in their pubspec. Before publishing, it checks for possible secret leaks with limited patterns and may warn or refuse publication. Its security advisories use the GitHub Advisory Database for Dart and Flutter packages. Pub can often resolve dependencies offline from its shared cache. It is free and open source, supports Windows, Linux, and macOS, and focuses on Dart packages.

Who it is for

Pub suits Dart developers who need to manage or publish packages across projects. It also fits teams that want lockfiles to keep dependency versions consistent.

What is good

  • Resolves dependencies against the installed Dart SDK.
  • Supports hosted, Git, local-path, and SDK package sources.
  • Lockfiles help teams use consistent dependency versions.
  • Offline resolution can use the shared package cache.
  • Works with Dart and Flutter command-line tools.

What to know first

  • Publishing to pub.dev disallows Git and local-path dependencies.
  • Package workflows focus on Dart.

Verdict

Pub brings dependency management and package publishing into Dart and Flutter development workflows. Its lockfiles, offline resolution, and IDE support are useful, with a publishing restriction on Git and local-path dependencies.

Compared on package managers

Free plan
Yesdart.dev
Supported languages
Dartdart.dev
Supported platforms
Windows, macOS, Linuxdart.dev
Editor integration
Yesdart.dev
License model
open_sourcedart.dev

Facts

Package formats
Dart packagesdart.dev · 21 Sept 2026
Dependency resolution
Yesdart.dev · 21 Sept 2026
Lockfile support
Yesdart.dev · 21 Sept 2026
Workspace support
Yesdart.dev · 21 Sept 2026
Private registry auth
Yesdart.dev · 21 Sept 2026
Offline installation
Yesdart.dev · 21 Sept 2026
Purpose
Pub is Dart’s package manager for finding and managing shared libraries and tools.dart.dev · 28 Sept 2026
Dependency management
Pub resolves package versions that work together and with the installed Dart SDK.dart.dev · 28 Sept 2026
Package sources
Dependencies can come from pub.dev, another hosted repository, a Git repository, a local path, or a supported SDK.dart.dev · 28 Sept 2026
Command line and IDEs
Pub can be used through the dart or Flutter command-line tools, and most Dart-savvy IDEs support package workflows.dart.dev · 28 Sept 2026
Publishing
The dart pub publish command uploads packages to pub.dev for others to download and use.dart.dev · 28 Sept 2026
Version consistency
Pub records selected dependency versions in a lockfile so application teams can use the same versions.dart.dev · 28 Sept 2026
Security advisories
Pub uses the GitHub Advisory Database for security advisories affecting Dart and Flutter packages.dart.dev · 28 Sept 2026
Secret detection
Before publishing, pub checks for potential secret leaks using limited patterns and warns or refuses publication when it detects a possible leak.dart.dev · 28 Sept 2026
Publisher verification
pub.dev verifies verified-publisher identities through domain ownership checks using Google Search Console logic.dart.dev · 28 Sept 2026
Automated publishing
Automated publishing can authenticate with temporary OpenID Connect tokens from GitHub Actions or Google Cloud IAM.dart.dev · 28 Sept 2026
Offline use
Pub can often resolve dependencies offline from packages already stored in its shared system cache.dart.dev · 28 Sept 2026
Publishing limit
Packages published to pub.dev cannot have Git or local path dependencies in their pubspec.dart.dev · 28 Sept 2026

Best Dart pub alternatives

See all 12

Where it ranks on Everything Xiaomi

Is Dart pub yours?

Claim it for free: prove the domain, then correct facts, plans and screenshots. An editor reviews every change.

Sources