This project demonstrates a robust implementation of clean architecture principles in a Flutter application. By separating concerns into layers (data, domain, and presentation), we achieve a well-organized, maintainable, and testable codebase. Bloc is utilized for effective state management, ensuring a clear separation of data and UI logic.
- Clean architecture for enhanced organization and maintainability
- Bloc for streamlined state management
- Modular structure for feature-based development
- Emphasis on testability for improved code quality
This project follows the guidelines of Clean Code Architecture, separating concerns into layers to achieve a high level of abstraction and decoupling between different modules. The main layers of this architecture include:
- Presentation Layer: Contains UI components such as screens, widgets, and their corresponding BLoCs for managing state.
- Domain Layer: Defines business logic and use cases independent of any UI framework.
- Data Layer: Handles data operations such as fetching from remote sources, local database, or shared preferences.
- BLoC for State Management: Utilizes the Bloc library for managing application state.
- Dependency Injection: Implements service locator pattern using
get_it
for efficient dependency management. - Localization: Supports multiple languages using the
intl
package for localization. - Networking: Uses Dio for making HTTP requests and
simple_connection_checker
for network connectivity checks. - Local Data Storage: Utilizes SQLite database via
drift
andsqlite3_flutter_libs
for local data storage. - Firebase Integration: Integrates Firebase services including Firebase Messaging, Crashlytics, and Analytics.
- UI/UX: Implements themes, navigation, and font customization using packages like
get
andgoogle_fonts
.
- Flutter SDK version
>=3.3.4 <4.0.0
. - Android SDK or Xcode for building and running the application.
This project leverages a variety of essential Flutter packages to deliver a rich user experience:
- flutter_bloc: Manages application state through BLoC patterns.
- equatable: Simplifies value object comparisons.
- get_it: Offers a dependency injection solution.
- get: Provides navigation and theming functionalities.
- dartz: Enables functional programming constructs in Dart.
- shared_preferences: Facilitates local storage of data.
- flutter_localizations: Supports app localization.
- intl: Aids in internationalization efforts.
- dio: Handles efficient networking operations.
- simple_connection_checker: Verifies internet connectivity.
- path: Assists with file path handling.
- path_provider: Provides access to application storage directories.
- drift: A powerful ORM (Object-Relational Mapper) for database interactions (optional).
- sqlite3_flutter_libs: Allows for SQLite database usage with Flutter (optional).
- firebase_messaging: Enables push notifications (optional).
- firebase_crashlytics: Integrates crash reporting (optional).
- firebase_analytics: Provides app usage analytics (optional).
- firebase_core: Core Firebase functionalities (optional).
- flutter_local_notifications: Local notification management (optional).
- flutter_flavorizr: Facilitates flavor management for different environments (optional).
- permission_handler: Requests and manages user permissions (optional).
- google_fonts: Integrates Google Fonts for a wider font selection (optional).
- Clone this repository to your local machine.
- Ensure Flutter SDK is installed and configured properly.
- Run
flutter pub get
to install dependencies. - Use an IDE like Android Studio or VSCode to open the project.
- Connect a device or use an emulator to run the application.
- Run 'flutter run' to run the application.
- Explore the codebase to understand the implementation of Clean Code Architecture.
- Modify and extend the project to build your own Flutter applications following the same architecture principles.
Contributions are welcome! Feel free to submit issues, feature requests, or pull requests to help improve this project.
This project is licensed under the MIT License - see the LICENSE file for details.
Looking for a custom Flutter mobile or web application? AIM Digital Technologies can help! Visit our website or contact us via email for a consultation.