Publish unscoped public package
As a dartpm user, you can create unscoped packages to use in your own projects and publish them to the dartpm public registry for others to use in their. Unscoped packages are always public and are refferd to by the package name only.
Creating and publishing an unscoped public package
Note
This article preassumes that you already have dartpm command line tool installed and login. To install and setup, visit "dartpm cli installation"
-
On the command line, create a directory for your package.
flutter create --template=package hello
-
Navigate to the root directory of your package:
cd hello
-
Update
pubspec.yaml
publish_to: "https://dartpm.com"
-
Run the publish command
dart pub publish