A premium Flutter billing app for small shops and retailers. Scan barcodes, manage products, generate PDF invoices, print via Bluetooth, track sales history, and sync data to the cloud — all in a beautifully designed UI with light & dark mode support.
- Email & Password login and registration
- Google Sign In with one tap
- Forgot Password via email reset link
- Persistent login — session restored on app relaunch
- Cloud backup to Firestore (background, non-blocking)
- Multi-device sync — login on a new device, data appears automatically
- Per-user data isolation — users can never see each other's data
- Logout with confirmation from the profile page
- Live camera scanner to quickly add products by barcode
- Camera On/Off toggle for manual control (preserves battery)
- Flash toggle to enable torch in low light
- Realtime detections with visual focus overlay
- Scan new barcode items to add to product catalog
- Add products by barcode scan or manual search
- Add temporary/custom items that aren't in the product list
- Adjustable quantities with cart management
- Real-time cart total calculation
- Select payment mode: Cash, UPI, or QR
- Customer name & mobile number input
- Invoices auto-numbered with format
INV-YYYYMMDD-XXXX - Payment method stored with each invoice in history
- Professionally formatted PDF invoices
- Shop name, address, GST number, footer text
- QR code support for UPI payment display
- ₹ symbol rendered correctly in PDFs
- Share PDF via WhatsApp, email, etc.
- Print receipts to any Bluetooth thermal printer
- Connects to 58mm/80mm printers
- Auto-format receipt with shop info & line items
- Add, edit, and delete products
- Barcode-linked products with name, price, and unit
- Supported units: Piece, Kg, Gram, Liter, Packet, Bottle, Box
- Quick product search and browsing
- Full history of all saved invoices
- Filter by: Today, This Week, This Month, All Time
- Search by customer name, mobile, invoice ID, or item name
- Detailed invoice view with all line items
- Payment mode badge (Cash / UPI / QR) inline on each card
- Cash vs UPI earnings breakdown in Detailed Analytics
- Delete invoices with confirmation dialog
- Configure shop name, address, phone number
- Upload shop logo
- Set UPI ID, QR image, GST number
- Footer message for printed receipts
- Premium glassmorphism card effects
- Smooth glowing gradient backgrounds in both light & dark mode
- Status bar adapts to theme (dark icons in light, light icons in dark)
- Dark/Light mode toggle with persistence
- Responsive design (phone + tablet/desktop rail navigation)
- Plus Jakarta Sans typography
UI → BLoC → Repository → Hive ← source of truth (offline-first)
↓ background, non-blocking
FirestoreSyncService → Firestore (cloud backup)
lib/
├── config/routes/ # GoRouter + auth guard redirect
├── core/
│ ├── data/ # Hive database initialization
│ ├── error/ # Failure classes
│ ├── services/ # ConnectivityService, FirestoreSyncService
│ ├── theme/ # AppTheme (light/dark), ThemeCubit
│ ├── utils/ # PDF helper, printer helper
│ └── widgets/ # GlassContainer, PremiumBackground, etc.
├── features/
│ ├── auth/ # Login, Signup, ForgotPassword, AuthCubit
│ ├── billing/ # ScannerPage, CheckoutPage, HistoryPage, HomePage
│ ├── product/ # ProductsPage, AddBarcodeItemPage, StoreHubPage
│ ├── settings/ # SettingsPage, PrinterBloc
│ └── shop/ # ShopDetailsPage, ShopBloc
└── main.dart
State Management: Flutter BLoC + Cubit Local DB: Hive (offline-first, source of truth) Cloud: Firebase Auth + Firestore (background sync) Navigation: GoRouter (with auth guard) DI: GetIt
- Flutter SDK
>=3.1.0 - Android device or emulator (API 21+)
- Firebase project with Authentication and Firestore enabled
google-services.jsoninandroid/app/
# Install dependencies
flutter pub get
# Generate Hive adapters
flutter pub run build_runner build --delete-conflicting-outputs
# Run the app
flutter run-
Enable Authentication in Firebase Console:
- Email/Password provider ✓
- Google provider ✓
-
Add SHA-1 fingerprint for Google Sign In:
cd android && gradlew signingReport
Add the debug SHA-1 in Firebase Console → Project Settings → Android App
-
Upload Firestore Security Rules (
firestore.rules): Firebase Console → Firestore → Rules → Publish -
Deploy Firestore Indexes (
firestore.indexes.json): Firebase Console → Firestore → Indexes → Import
CAMERA— barcode scanningBLUETOOTH,BLUETOOTH_CONNECT,BLUETOOTH_SCAN— thermal printingVIBRATE— scan feedbackINTERNET— Firebase Auth & Firestore sync
All Firestore data is isolated per user via security rules:
// Users can only access their own documents
allow read, write: if request.auth != null
&& resource.data.ownerId == request.auth.uid;Unauthenticated requests are always denied.
| Package | Purpose |
|---|---|
firebase_auth |
Email & Google authentication |
cloud_firestore |
Cloud backup & multi-device sync |
google_sign_in |
Google OAuth Sign In |
connectivity_plus |
Online/offline detection for sync |
flutter_bloc |
State management |
hive + hive_flutter |
Local offline-first database |
go_router |
Navigation with auth guard |
get_it |
Dependency injection |
mobile_scanner |
Barcode camera scanner |
pdf + printing |
PDF generation & sharing |
print_bluetooth_thermal |
Bluetooth receipt printing |
permission_handler |
Runtime permissions |
google_fonts |
Plus Jakarta Sans typography |
- Hive typeIds:
ProductModel=0,ShopModel=1,BillItemModel=2,BillModel=3 - Invoice format:
INV-YYYYMMDD-NNNN(sequential per day) - Payment method: nullable string on
BillModel(@HiveField(8), backward-compatible) - MobileScanner: Controller manually managed per page lifecycle to avoid double-start conflicts
- Firestore sync: Fire-and-forget — never blocks the UI. Call
FirestoreSyncService.triggerSync()after any Hive write - New device login:
seedFromCloud(uid)pulls Firestore → seeds Hive once (only inserts missing records) - Offline mode: App works fully offline. Sync happens automatically when connectivity is restored
Private/commercial use. All rights reserved.