Start a new Flutter project in Android Studio and choose Flutter Package for the project type. Put your custom widget in the lib folder. Add a folder named example to the project root. In there, add a Flutter app that demonstrates how to use your widget.
Read moreHow do I use local flutter package?
For the full process:
Read moreWhat is a package in flutter?
Packages, according to Flutterdocs, can be explained as “shared packages contributed by other developers to the Flutter and Dart ecosystems . This allows developers to quickly build an app without having to develop everything from scratch.”
Read moreHow do I install a package on flutter?
How to Fix “Failed to install the following Android SDK packages as some licenses have not been accepted” Error in Android Studio?
Read moreHow do I load a package on DART?
To use a package, do the following:
Read more