Skip to content

hashtag32/BaeckOnTrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BaeckOnTrack 🥐

A minimal Flutter scanning app for delivery drivers to track bakery crates loaded into and removed from their vehicle.


What it does

Drivers scan QR codes attached to bakery crates using the phone camera. Each scan is recorded as a Check In (loading a crate) or Check Out (removing a crate). The app shows a live count of crates currently in the vehicle.

Key design goal: maximum scanning speed with minimal UI interaction.


Features

  • Fullscreen camera scanner — continuous QR code detection via Google ML Kit
  • Check In / Check Out mode — two large buttons to switch scanning direction
  • Live inventory banner — shows total crate count and a breakdown by product type
  • Scan feedback — short beep + vibration on every accepted scan
  • Duplicate scan cooldown — 1-second cooldown per QR code prevents double-counting
  • In-memory event log — full history of all scan events with timestamps

Supported QR code formats

A plain numeric ID (most common):

14

Or a JSON payload:

{
  "package_id": "88291",
  "product_type": "croissant"
}

Getting started

Prerequisites

  • Flutter SDK ≥ 3.11
  • Android device or emulator (API 21+)
  • For Chrome emulation: any browser

Run on Android

flutter run

Run in Chrome (emulation mode)

flutter run -d chrome

In Chrome, tap the QR button (bottom right) to open the emulation dialog. Enter a crate ID (e.g. 14) and tap Scan to simulate a real scan.


Project structure

lib/
├── main.dart                    # App entry point, Provider setup
├── models/
│   └── models.dart              # ScanMode, InventoryItem, ScanEvent
├── providers/
│   └── inventory_provider.dart  # In-memory state, scan logic, cooldown
├── screens/
│   └── scanner_screen.dart      # Main screen (camera + overlays)
├── services/
│   └── feedback_service.dart    # Beep generation + vibration
└── widgets/
    ├── inventory_banner.dart    # Top floating crate count banner
    └── mode_toggle.dart         # Check In / Check Out buttons

Dependencies

Package Purpose
mobile_scanner QR code detection via camera
provider Lightweight state management
vibration Haptic feedback on scan
audioplayers Beep audio playback

Architecture

State is managed with a single InventoryProvider (ChangeNotifier). The inventory is an in-memory Map<String, InventoryItem> keyed by package_id. All scan events are appended to a List<ScanEvent> for audit/export purposes.

The beep is generated programmatically as a PCM WAV sine wave — no audio asset files are required.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors