The Right Way To Implement Clean Arch For Flutter Apps

Fred Grott
3 min readAug 4, 2022

Look, it’s easy for app designers mastering flutter to get lost in clean architecture implementations; as there are two distinct variations that are shown online. And if you choose the wrong one, it shuts down your fast design prototyping dead in the water. Let me step you through a way to think about it and make the correct choice.

The Most Important Core Thing About Fast Design Prototyping

The difference between an awesome fast prototype flutter app design and something raw and brittle that breaks constantly with changes is how we do the project set up as the awesome designed app is usually using 25 plugins and modifying how themes are implemented among other things. If we are creating multiple apps, we have to align our clean arch implementation with the devops set up.

And, devops-wise we should be using the mason template engine and develop a project template that has our basic clean arch, responsive strategy, and theme strategy for fast prototyping. And mason templates do not handle code generation embedded in the outputted templates.

So, with that in mind, let’s examine two ways of implementing the domain and data immutable data class value type objects.

Value Type Objects VIA Freezed

--

--