A Flutter project with Clean Architecture. For the link of the project presentation, click here.
It's a layered and domain-centric architecture.
With the following advantages:
- Structuring
- Decoupling
- Testable
- Independence
This rule says that source code dependencies can only point inwards.
The Domain
layer defines the business logic of the application.
- Core : The main classes that are used in the
Domain
layer. - Entities : Enterprise wide business rules.
- UseCases : Application specific business rules.
- Repositories : Abstract classes that define the expected functionality of outer layers.
cd clean_project/layers/domain
The Data
layer is responsible for data retrieval.
- Repositories : Concrete classes that implement the repository from the domain layer.
- ExternalData : Data source(Rest Api, Firebase , Device).
cd clean_project/layers/data
The Presentation
layer is the representation of the application.
- Configuration : Initial settings of the
Presentation
layer (Navigation, Initialization). - Screens : Represents the user interface, events, and lifecycle.
cd clean_project/layers/presentation
or
cd clean_project/layers/getx_presentation
The App
layer contains all the general app configurations(Platform(IOS,Android), Dependency Injection, Run App).
cd clean_project/lib
Install flutter to run the project.
Run the following commands
cd clean_project
flutter pub get
flutter run
WITH_GETX=true
flutter run
- The Clean Code Blog
- Uncle Bob
- Clean Architecture Guide
- Multiple ways of defining Clean Architecture layers
- Security Tips
- SSL Pinning
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.