Structuring a Publishable Library
Lay out lib, src, and the public API.
A Package Is Just a Folder
A publishable Dart package is simply a folder with a pubspec.yaml at its root. That one file turns plain code into something pub.dev can host. 📦
The lib Folder Is the Public Home
Everything you want users to import lives under lib. Files directly in lib are part of your package's public surface, so place them with care.
All lessons in this course
- Structuring a Publishable Library
- Documenting With dartdoc Comments
- Linting, Formatting, and pana Score
- dart pub publish to pub.dev