Creating your own package (part 3)
If you want to contribute to the Flutter community, you can share your packages in the pub.dev
repository. In this recipe, you will see the steps required in order to achieve this.
Getting ready
You should have completed the previous recipes, Creating your own package (part 1) and Creating your own package (part 2).
How to do it...
Let’s look at the steps to publish a package to pub.dev
:
- In a terminal window, move to the
area
directory:cd packages/area
- Run the
flutter pub publish --dry-run
command. This will give you some information about the changes required before publishing. - Copy the BSD license, available at the following link: https://opensource.org/licenses/BSD-3-Clause.
BSD licenses are open source licenses that allow almost any legitimate use of the software, cover the author from any liability, and only add minimal restrictions on the use and distribution of the software...