Am I required to publish my Dart package to pub.dartlang.org before I use it? Am I required to publish my Dart package to pub.dartlang.org before I use it? dart dart

Am I required to publish my Dart package to pub.dartlang.org before I use it?


If you just want to use a package locally, there's no need to "publish" it all. (And I'm not sure what that would even mean.) Instead, you can just use a path dependency to depend on it.

If you have some local package foo and you want to use it from another local package bar, in bar's pubspec, just add:

dependencies:  foo:    path: path/to/bar


What Bob said.

Also, if you need to have multiple developers inside your company all sharing the same internal package, you can use pub's support for git dependencies.

If you push your internal package to a local/internal git server, all your developers can access it.

Here is an example:

dependencies:  foo:    git: git://your.internal.server/package.git