how to create your own package for your own use in flutter code example
Example 1: flutter publish package command
flutter pub publish --dry-run /// run this before publishing the package
flutter pub publish /// when ready to publish
Example 2: write module for flutter
$ flutter create --template=package hello