Kevanon Stack Overflow • Recommends
On “How do you share code between 2 Flutter projects?”
Here is the approach I found: using packages.
You can create a package with the following terminal command:
flutter create --template=package myPackageName
then simply create whatever class, function, etc. you want to share across your projects in the package and import them in your other Flutter projects.
Here is an example: link to this video