qr_scanner_kit 0.3.0
qr_scanner_kit: ^0.3.0 copied to clipboard
A ready-to-use QR scanner screen and viewfinder overlay built on mobile_scanner, with torch, camera switching, and a simple scan callback.
0.3.0 - 2026-11-03 #
- Add continuous scanning:
QrScanner(continuous: true)keeps the camera running and reports every accepted code instead of stopping after the first. - Add
duplicateWindow(default two seconds) and the publicScanDeduper, which suppress repeated captures of the same code in continuous mode. - Add
hintandhintStyleto draw a short instruction over the preview. - Add
scanWindowto restrict detection to a rectangle of the preview. - Add
errorBuilderand a default camera error view with a retry button. A denied camera permission gets a dedicated message. popOnScanapplies to the one-shot mode; continuous mode never pops.
0.2.0 - 2026-10-14 #
- Add barcode format selection:
QrScannerpassesformatsto the internally created controller. An injected controller keeps its own formats. - Add gallery scanning:
QrImageScanner.scanImageFiledecodes one barcode from an image file with its own short-lived controller. A live camera scan stays untouched. Unsupported platforms throw anUnsupportedError. - Add haptics:
hapticsEnabled(defaulttrue) plays a light haptic impact when the scanner accepts a code. - Add validation hooks:
isAcceptedfilters values before the one-shot gate. A rejected value consumes no scan attempt, fires no haptics, and callsonRejectedinstead ofonScan.
0.1.2 #
- Documentation and internal cleanup.
0.1.1 #
- Rewrite the README. The install section now uses
flutter pub add qr_scanner_kit.
0.1.0 #
- Initial release.
- Extracted the Rocketbot app's QR scanning into a reusable package:
QrScanner,BarcodeOverlay, andScanGate, built onmobile_scanner ^7. QrScanneris a full-screen scanner with a camera preview, torch control, and front/back camera switching.- Every capture goes through a single scan-result path (one barcode stream
subscription), fixing the app's old widget that handled results twice
through both
onDetectand a stream listener. - Lifecycle-safe disposal ordering: the widget stops the subscription, then disposes the controller, and the controller is never disposed from the scan handler. Camera stop errors are swallowed instead of surfacing as unhandled exceptions.
BarcodeOverlay.scalenow preserves every configured value (border, radius, cut-out, and offset) instead of resetting them to defaults.onScanhas one-shot semantics: at most one value per widget lifetime.popOnScan: falsekeeps the screen open but reports no further barcodes.- An injected
MobileScannerControllerhas itsautoStartsetting respected; the widget still manages start/stop and takes ownership by disposing it. BarcodeOverlayis derived fromOverlayShapeinai_barcode_scanner5.2.2 (Apache-2.0); attribution is documented in the README andTHIRD_PARTY_NOTICES.