Flutter and Clean Architecture

Rodrigo Martins
6 min readNov 24, 2019

Hello, my name is Rodrigo Lopes. The purpose of this article is to share a little about clean architecture in the flutter. I will talk in general about the concepts and at the end show a practical implementation of how it works.

Explaining the concept of clean architecture:

The idea behind the clean architecture concept is to make the project scalable, easy to maintain and testable, creating separate layers and always depending on abstractions and not concrete classes.

Key points

  1. Independence of frameworks: Your project can never be dependent on an external framework, there must always be a layer that abstracts logic, thus making it possible to remove the framework without impacting the application.
  2. Testable: The business rule layer must be tested without dependence on UI, Bank or Web Service.
  3. Independence of the UI: Your system should not be aware of the existence of a UI, being possible to replace its graphical interface with a terminal without problems.
  4. Independence from external agents: Your business rules should not know about the existence of the world around you. In other words, she just needs to know what she needs to perform her responsibility.

Layers

--

--

Rodrigo Martins
Rodrigo Martins

Written by Rodrigo Martins

Be brave and boldly go where no man has gone before. Let's discover the future!

Responses (5)