Skip to content

AntonyChinVal/flutter-clean-architecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 

Repository files navigation

CleanFlutter

A Flutter project with Clean Architecture. For the link of the project presentation, click here.

Introduction

It's a layered and domain-centric architecture.

With the following advantages:

  • Structuring
  • Decoupling
  • Testable
  • Independence

Dependency Rule

This rule says that source code dependencies can only point inwards.

Layers

Domain

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

Data

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

Presentation

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

App

The App layer contains all the general app configurations(Platform(IOS,Android), Dependency Injection, Run App).

cd clean_project/lib

Installation

Install flutter to run the project.

Run the following commands

cd clean_project

flutter pub get

Run with Riverpod

flutter run

Run with GetX

WITH_GETX=true
flutter run

Libraries

References

Help

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published