I am trying to understand Dart's recommended project structure and not seeing the "forest through the trees".
So, if my project is intended to be a reusable library, say, a logging framework of some sort, then if I understand the above link correctly, I want all of my development to be under a lib
and lib/src
directory.
But what if I am building a web app? Where do my Dart source files go? Under packages
? Specifically:
start from the domain layer and identify the model classes and business logic for manipulating them. create a folder for each model (or group of models) that belong together. within that folder, create the presentation , application , domain , data sub-folders as needed. inside each sub-folder, add all the files you ...
The minimal requirements for a library are: pubspec file. The pubspec. yaml file for a library is the same as for an application package—there is no special designation to indicate that the package is a library.
1)
static content like jpg, css go to * your_app_package/asset
2) the packages directory is maintained automatically. You configure in the file pubspec.yaml
which 3rd party libraries you want to use and then call pub get
or pub upgrade
and the packages
directory is updated automatically (the Darteditor does this automatically when you update pubspec.yaml
).
3) not that I know of.
I had some problems putting additional classed in the code file of a Polymer element though. But I guess this is just a temporary limitation of Polymer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With