Importing Your Dart Package as Dependencies
To import your package inside your Flutter app, open flutter/pubspec.yaml again and change the dependency to an external one:
my_genderizeio: 1.0.0
Run flutter pub get
, and you’ll be good to go!
Build and run your Flutter project.
Where to Go From Here?
You can download the learning materials using the Download Materials button on the top or bottom of the page to compare your results.
Creating a Dart package from scratch is a fairly basic process, and it’s a good learning step to creating and learning Dart overall.
If you’re interested in exploring Dart some more, check out:
I hope you enjoyed making your first Dart package and found this tutorial helpful. Please join the forum discussion below if you have any questions or comments.