According to the Package layout conventions the web
folder should contain the following:
HTML, CSS, images, and, heck, probably even some JavaScript. All of that goes into your package’s web directory. You’re free to organize the contents of that to your heart’s content. Go crazy with subdirectories if that makes you happy.
So my web
directory looks something like this:
web/data_access
web/model
web/ui
web/ui/navigation
etc.
Now, how to I manage all those import statements. I get a lot of statements like:
import '../../model/my_model.dart';
import '../../data_access/mock_dao.dart';
etc.
I don't like using that many ../
in my imports because this is fragile and I get problems whenever I change anything in my folder structure.
Is there a better way to organize code inside the web
folder?
or
Is there another way to do the imports?