Creating and publishing an organization-scoped package
As an organization member, you can create and publish public and private packages within the organization's scope.
Before creating and publishing packages, ensure you are logged in to your dartpm account using dartpm login
. You must also have the appropriate permissions within your organization to publish packages.
Creating an organization-scoped package
-
On the command line, create a Flutter package:
flutter create --template=package hello
-
Navigate to the root directory of your package:
cd hello
-
To create an organization-scoped package, update
pubspec.yaml
:publish_to: "https://dartpm.com/registry/<scope-name>"
Publishing a private organization-scoped package
By default, dart pub publish
will publish a scoped package as private.
Any scoped package is published as private by default. However, if you have an organization that does not have the Private Packages feature, dart pub publish
will publish public package.
-
On the command line, navigate to the package directory.
-
Run
dart pub publish
.
Private packages will say private
below the package name on the dartpm website.
Publishing a public organization-scoped package
By default, dart pub publish
will publish a scoped package as private.
To publish an organization-scoped package as public, follow these steps:
-
On the command line, navigate to the package directory.
-
Run
dart pub publish
. -
After publishing, the package visibility depends on your organization's settings:
- If your organization has the Private Packages feature, the package will be published as private by default. You can change it to public through the web interface.
- If your organization does not have the Private Packages feature, the package will be published as public automatically.

Public packages will say public
below the package name on the dartpm website.