Project Layout As A Way To Architecture Layers In Flutter

Fred Grott
4 min readJul 28, 2022

I have a need to have a specific flutter project structure for the apps I build to demo the paid Flutter UI Kits I am building and the Flutter demo apps I am building for my Flutter App Designer book series. And that happens to mirror the exact way one should use project layout to help architecture layers for a flutter app. Let me show you.

Oh, So! Many Packages

A package in the Flutter build system is this set of code that can have unit tests that can be shared:

And, it can also have and share assets. So I can use them in this way:

1. Domain (package)

-Has the full domain layer with unit tests and is the first thing built of the app

2. Presentation (package)

-Contains the themes and custom widgets and only has unit tests but no goldens testing

--

--