The best directory structure for Flutter projects? How to build clean architecture

 



When you develop a mobile project in particular and also a software in particular. To optimize project performance as well as progress the project as quickly as possible, the project folder structure will show the clarity and consistency of the project.


To be able to well implement the project structure according to standards. We need to clearly understand the concept of "clean architecture"


 tree:

 .
├── components
│   ├── di
│   │   ├── injection
│   │   │   └── injection.dart
│   │   └── modules
│   │       ├── api_module.dart
│   │       ├── bloc_module.dart
│   │       ├── components_module.dart
│   │       └── repository_module.dart
│   └── network
│       └── dio_client.dart
├── configurations
│   ├── configurations.dart
│   └── default_env.dart
├── data
│   ├── datasources
│   │   ├── local
│   │   │   ├── data_manager.dart
│   │   │   ├── data_manager_impl.dart
│   │   │   └── prefs
│   │   │       ├── app_preferences.dart
│   │   │       └── app_preferences_impl.dart
│   │   └── remote
│   │       ├── gov_api.dart
│   │       └── gov_api.g.dart
│   ├── entities
│   │   ├── record_entity.dart
│   │   └── record_entity.g.dart
│   ├── models
│   │   ├── data_store_model.dart
│   │   ├── data_store_model.g.dart
│   │   ├── record_model.dart
│   │   ├── record_model.g.dart
│   │   ├── store_result_model.dart
│   │   └── store_result_model.g.dart
│   └── repositories
│       ├── gov_repository.dart
│       └── impl
│           └── gov_repository_impl.dart
├── env.dart
├── main.dart
├── presentation
│   ├── app.dart
│   ├── features
│   │   ├── login
│   │   │   └── login_screen.dart
│   │   ├── main
│   │   │   ├── dashboard
│   │   │   │   └── dashboard_screen.dart
│   │   │   └── home
│   │   │       ├── bloc
│   │   │       │   ├── home_bloc.dart
│   │   │       │   ├── home_event.dart
│   │   │       │   └── home_state.dart
│   │   │       ├── home_page.dart
│   │   │       ├── interactor
│   │   │       │   ├── home_interactor.dart
│   │   │       │   ├── home_repository.dart
│   │   │       │   └── impl
│   │   │       │       └── home_interactor_impl.dart
│   │   │       └── repositories
│   │   │           └── home_repository_impl.dart
│   │   └── routes.dart
│   ├── theme
│   │   └── theme.dart
│   └── widgets
│       └── loading_widget.dart
└── tree.txt

CONVERSATION

0 comments:

Post a Comment