The project is designed with a clean and organized structure for better clarity and scalability.
This folder contains the fundamental and shared components of the app:
- DI (Dependency Injection):
- Uses
get_it
for managing dependencies.
- Uses
- Networking:
- Utilizes
dio
along withretrofit
for clean and simplified API calls.
- Utilizes
- Routing:
- Manages navigation between screens.
- Helpers:
- Utility classes and helper functions.
- Theming:
- Handles the app’s theme and color customization.
- Widgets:
- Reusable UI components.
The app is modularized into features, and each feature has an independent structure:
- Data
- Models: Data models for the feature.
- Repo: Repository layer for data access.
- Logic
- Cubit/States:
State management usingflutter_bloc
and Cubit.
- Cubit/States:
- UI
- Screens/Widgets:
Screens and reusable UI components for the feature.
- Screens/Widgets:
- State Management:
flutter_bloc
- Dependency Injection:
get_it
- Networking:
dio
retrofit
pretty_dio_logger
- Code Generation:
freezed
andfreezed_annotation
json_serializable
andjson_annotation
build_runner
- Localization:
easy_localization
intl
- UI Libraries:
flutter_svg
flutter_screenutil
- Firebase Integration:
firebase_core
- Splash Screen:
flutter_native_splash
lib/
│
├── core/ # Shared core components
│ ├── di/ # Dependency Injection
│ ├── networking/ # Dio + Retrofit
│ ├── routing/ # Navigation management
│ ├── helpers/ # Utility functions
│ ├── theming/ # App themes and colors
│ └── widgets/ # Reusable UI components
│
├── features/ # App features
│ └── home/ # Home feature
│ ├── data/ # Data layer (Models, Repository)
│ ├── logic/ # State management (Cubit/States)
│ └── ui/ # User Interface (Screens/Widgets)
│
├── my_app.dart # The main app widget; sets up the app structure and themes
├── main_development.dart # Entry point for the development environment
└── main_production.dart # Entry point for the production environment