lib flow

 lib/

├── core/                          # Các thành phần cốt lõi và tài nguyên dùng chung

│   ├── config/                    # Các file cấu hình (API, Dio, môi trường, v.v.)

│   │   └── dio_config.dart

│   ├── constants/                 # Các hằng số chung (đường dẫn, keys, v.v.)

│   │   ├── api_constants.dart

│   │   └── app_constants.dart

│   ├── utils/                     # Các hàm tiện ích (formatting, validators, v.v.)

│   │   ├── date_utils.dart

│   │   └── network_utils.dart

│   └── services/                  # Các dịch vụ không thuộc tầng data (logging, navigation, v.v.)

│       └── navigation_service.dart

├── data/                          # Tầng dữ liệu (API, database, models)

│   ├── models/                    # Các model dữ liệu

│   │   ├── user_model.dart

│   │   └── post_model.dart

│   ├── repositories/              # Các repository triển khai logic liên quan đến dữ liệu

│   │   ├── user_repository.dart

│   │   └── post_repository.dart

│   ├── network/                   # Các lớp liên quan đến API và Dio

│   │   ├── api_service.dart

│   │   └── dio_client.dart

├── presentation/                  # Tầng trình bày (View và Presenter)

│   ├── screens/                   # Các màn hình trong ứng dụng (View)

│   │   ├── home_screen.dart

│   │   └── user_profile_screen.dart

│   ├── presenters/                # Các Presenter quản lý logic của View

│   │   ├── home_presenter.dart

│   │   └── user_profile_presenter.dart

│   ├── views/                     # Các View Interface để kết nối với Presenter

│   │   ├── home_view.dart

│   │   └── user_profile_view.dart

│   └── widgets/                   # Các widget dùng chung hoặc tùy chỉnh

│       ├── custom_button.dart

│       └── custom_text_field.dart

├── l10n/                          # Các file liên quan đến localization

│   ├── en.json

│   └── vi.json

├── main.dart                      # Entry point của ứng dụng

└── injection_container.dart       # Service Locator để quản lý dependency injection


Post a Comment

Previous Post Next Post