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, both for private and commercial reasons.
- Open the LICENSE file in the area directory.
- Paste the BSD license into the LICENCE file.
- In the first line of the license, add the current year and your name, or the name of your entity:
Copyright 2021 Your Name Here
- Open the README.md file.
- In the README.md file, remove the existing code and add the following:
# area
A package to calculate the area...