Dinesh-Sowndar/flutter_billing_app
Dinesh-Sowndar/flutter_billing_app open-source repository details.
- Stars
- 1604
- Forks
- 764
- 最近推送(UTC)
- 2026年3月11日
- 项目状态
- 未归档
使用的依赖
依赖清单 25 项
- flutter
{"sdk":"flutter"} - cupertino_icons
^1.0.8 - flutter_bloc
^8.1.5 - get_it
^7.6.7 - equatable
^2.0.5 - fpdart
^1.1.0 - json_annotation
^4.9.0 - go_router
^14.0.0 - hive
^2.2.3 - hive_flutter
^1.1.0 - google_fonts
^6.1.0 - vibration
^3.1.8 - intl
^0.19.0 - permission_handler
^11.3.1 - pretty_qr_code
^3.3.0 - print_bluetooth_thermal
^1.1.2 - mobile_scanner
^5.1.0 - bloc
^8.1.4 - uuid
^4.5.2 - app_settings
^7.0.0 - flutter_test开发依赖
{"sdk":"flutter"} - flutter_lints开发依赖
^3.0.0 - build_runner开发依赖
^2.4.8 - json_serializable开发依赖
^6.7.1 - hive_generator开发依赖
^2.0.1
所在榜单
原始 README
以下为英文项目原文快照,最新内容请访问 GitHub。
展开 / 收起项目 README
🛒 Mobile POS & Billing App
A feature-rich, high-performance offline-first billing and Point of Sale (POS) application built with Flutter. Designed for seamless retail checkout operations featuring barcode scanning, thermal Bluetooth printing, and robust local data persistence.
Screenshot
https://github.com/user-attachments/assets/f2d16454-5408-43b3-b207-cd843bbc2c9e
🎯 Project Scope
This application serves as a complete offline POS system for small to medium-sized retail shops. It streamlines the checkout process, catalog management, and receipt generation securely entirely on-device.
Core Features:
- Product Management System: Complete CRUD operations for inventory items with barcode/QR code support.
- Smart Checkout System: Rapid cart building via camera-based barcode scanning or manual entry, and robust order calculation functionality.
- Bluetooth Thermal Printing: Direct integration with thermal printers (
print_bluetooth_thermal) to instantly output physical receipts. - Shop Settings & Customization: Centrally managed shop details printed dynamically on receipts.
- Offline-First Architecture: Powered by
Hivefor lightning-fast localized NoSQL data storage. No active internet connectivity required.
🛠 Tech Stack & Architecture
Built leveraging industry-standard architectural principles (Clean Architecture & Feature-Driven Design) ensuring scalability, separation of concerns, and robust testability.
- Framework: Flutter (SDK >=3.1.0)
- State Management:
flutter_bloc - Dependency Injection:
get_it - Routing:
go_router - Local Database:
hive&hive_flutter - Data Modeling:
json_serializable,equatable - Functional Programming:
fpdart - Hardware Integrations:
mobile_scanner(barcodes),print_bluetooth_thermal
📁 File Structure
The codebase is organized using a Feature-First Clean Architecture utilizing domain-driven concepts.
lib/
├── core/ # Core application utilities and shared components
│ ├── data/ # Global data sources (e.g., Hive initialization)
│ ├── error/ # Standardized Failure/Exception models (fpdart compatible)
│ ├── theme/ # UI aesthetics, typography, styling
│ ├── usecase/ # Base UseCase contracts
│ ├── utils/ # Helpers (e.g., PrinterHelper, formatters)
│ ├── widgets/ # Reusable global UI widgets (AppBars, generic buttons)
│ └── service_locator.dart # get_it dependency injection setup
│
└── features/ # Independent feature modules
├── billing/ # Core POS operations: Cart, Checkout, Invoice Generation
├── product/ # Inventory management: Adding, Listing, Scanning products
├── settings/ # App configuration: Printer connections, App settings
└── shop/ # Shop details configuration
Note: Each feature is further subdivided internally into Clean Architecture layers: data, domain, and presentation.
💡 Use Cases
- Rapid Billing Entry: A cashier launches the app, navigates to the checkout page, and uses the device camera to instantly scan product barcodes. The products are added to the cart, the total is calculated including taxes, and a receipt is finalized.
- Physical Receipt Generation: After checkout confirmation, the app triggers a connected external Bluetooth thermal POS printer to instantly print an itemized paper receipt with the shop’s header.
- Inventory Sideloading: A manager opens the Product feature to add new stock to the local database, taking a picture of the barcode to bind the SKU for future lightning-fast checkouts.
- No-Connection Operation: The business operates a stall at an exhibition with poor networking. The app functions entirely via its embedded Hive local database and Bluetooth, completely undisturbed by network drops.
🚀 Getting Started
Prerequisites
- Flutter SDK
^3.1.0or higher - Android Studio / Xcode for emulators and building.
- Optional: A physical Android/iOS device and a Bluetooth Thermal Printer for testing hardware integrations natively.
Installation
-
Clone the repository and navigate to the project directory:
git clone <repository_url> cd billing_app -
Fetch dependencies:
flutter pub get -
Run code generation (required for Hive adapters and JSON serialization):
dart run build_runner build --delete-conflicting-outputs -
Run the project:
flutter run
🤝 Contributing Guidelines
As a senior-focused project, please adhere to:
- Clean Architecture Rules: Maintain strict boundaries between
domain,data, andpresentationlayers. - Immutable States: Emit only immutable states from BLoCs utilizing
equatable. - No Direct Exceptions in Domain: Utilize
fpdart'sEither<Failure, Type>pattern to handle control flow for exceptions.