A robust, production-oriented Point of Sale application showcasing modern Flutter development practices. Built with Clean Architecture, BLoC state management, and a Domain-Driven Design approach.
A perfect reference project for building scalable, offline-first Flutter applications.
Note: Replace these placeholder links with actual screenshots of your application!
- Offline-First Data: Uses
drift(SQLite) for local persistence of products and sales. - Reactive State: Seamless UI updates driven by
flutter_bloc. - Domain-Driven Business Logic: Highly decoupled architecture making business rules easy to test and maintain.
- Cart Management: Dynamic shopping cart with standard 10% tax total calculations.
- Admin Console: Easily add, edit, or delete products and review sales transaction history.
- Secure Storage: Implementation of
flutter_secure_storageandcryptographyfor secure data handling. - Receipt Generation (WIP): Setup included for PDF creation and printing using the
pdfandprintingpackages. - Responsive Design: Two-panel layout supporting various screen sizes.
This project strictly adheres to Clean Architecture principles, dividing the system into three main layers to ensure separation of concerns, scalability, and testability:
- State Management: Handled by
flutter_bloc(e.g.,CartBloc,ProductCatalogBloc). - UI Views: Built with Material 3. Examples include
POSViewandAdminHomeView.
The core of the application containing business logic, entirely independent of other layers.
- Entities:
Product,CartEntity,TransactionRecord. - Use Cases:
CalculateTotal,SaveTransaction. - Contracts (Repositories):
ProductRepository,SalesRepository.
Handles data retrieval and persistence, implementing the domain repository contracts.
- Data Sources:
ProductLocalDataSource(Drift),MockProductRemoteDataSource. - Models:
ProductModel.
All services, blocs, and repositories are managed and injected using get_it.
- Framework: Flutter (Material 3)
- State Management: flutter_bloc
- Dependency Injection: get_it
- Local Database: drift
- Value Equality: equatable
- Functional Programming: dartz
- Security: flutter_secure_storage, cryptography
- PDF & Printing: pdf, printing
- Flutter SDK installed and added to your PATH.
-
Clone the repository:
git clone https://github.com/yourusername/flutter_pos.git cd flutter_pos -
Install dependencies:
flutter pub get
-
Run the app:
flutter run
Keep the code clean and well-tested using the following commands:
-
Analyze code (Linting):
flutter analyze
-
Run unit tests:
flutter test
We are constantly working to improve this POS system. Here is what's on the horizon:
- Testing: Add comprehensive unit tests for domain use cases, repository logic, and
CartBloctransitions. - Checkout Validation: Implement stronger validation rules during the checkout flow.
- Receipt Generation: Finalize and polish PDF receipt generation and printing functionality.
- Persistent Cart: Introduce local storage caching to restore the cart state on app restart.
- Reporting: Advanced sales charts and reporting in the Admin dashboard.
Development progress, next features, and bug backlogs are tracked in PROJECT_TRACKER.md.
Contributions, issues, and feature requests are welcome! This is an open-source project and I would love to see how the community can help improve it.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details. (Note: Please ensure a LICENSE file is added to the repository).


