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_itfor managing dependencies.
- Uses
- Networking:
- Utilizes
dioalong withretrofitfor 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_blocand 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:
dioretrofitpretty_dio_logger
- Code Generation:
freezedandfreezed_annotationjson_serializableandjson_annotationbuild_runner
- Localization:
easy_localizationintl
- UI Libraries:
flutter_svgflutter_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