camera_scanner_kit 1.2.0
camera_scanner_kit: ^1.2.0 copied to clipboard
A production-grade Flutter UI toolkit for high-speed barcode scanning, featuring native haptics, zero-latency audio, and inline routing.
1.2.0 #
- Dependency: Upgraded
native_haptics_and_audioto^2.0.0. If your app also depends on it directly, bump your own constraint to^2.0.0— otherwise this release will not resolve. - Fix (Audio): The scanner beep is now preloaded and pinned at startup. 2.0.0 changed
initialize()to load no audio, so the first scan of a session would otherwise decode its beep on the hot path, losing the zero-latency guarantee. - Fix (Audio): Scan feedback is no longer dropped when a barcode is read before the audio engine finishes initializing. Playback now defers onto the warm-up instead of silently no-opping.
- Fix (Inline Scanner):
BarcodeScannerViewnow detaches itsBarcodeScannerControllerindispose(), and rebinds a swapped controller viadidUpdateWidget. Previously a controller that outlived the view threwsetState() called after dispose()on a laterstart(),stop()ortoggle(). - Fix (ScannerScreen): The same-item cooldown now uses a monotonic
Stopwatchinstead ofDateTime.now(), so an NTP sync or a device time/timezone change can no longer freeze or skip it. - Perf:
enableSoundAndVibration: falseno longer initializes the native audio engine or loads any audio. Note this value is read once ininitState; changing it at runtime requires a remount. - Documentation: Added a Sound & Haptics section to the README covering the shared audio engine and
respectSilentSwitch— which the host app must set inmain()for scanner beeps to survive the iOS hardware ringer switch. Also repaired several broken DartDoc references. - Chore: Migrated to the 2.0.0 API (
PosSound→NativeSound,PosHaptic→HapticPattern,playSound()→play()) and modernizedanalysis_options.yamlfor Dart 3.11. - Chore: Corrected the Flutter constraint from
>=1.17.0to>=3.41.0. The old bound was unenforceable — the Dart constraint already required Flutter 3.41 — so this excludes no one who could install 1.1.6.
1.1.6 #
- Dependency: Upgraded
native_haptics_and_audioto^1.1.0to inherit its new SwiftPM iOS architecture, Android Built-in Kotlin compatibility, and hardenedinitialize()concurrency guards. - Dependency: Upgraded
mobile_scannerto^7.4.0. - Fix: Wrapped
_effects.initialize()calls inunawaited()to satisfyunawaited_futureslinting on the new async signature.
1.1.5 #
- Fix: Added
isTransitioningidempotency guards tostart()andstop()inBarcodeScannerControllerto prevent redundant hardware toggle attempts during active transitions. - Feature: Exposed
detach()onBarcodeScannerControllerto safely release the hardware bindings without fully disposing the controller, useful for complex tab-switching rebuilds. - Fix: Corrected an inconsistent logging tag in
BarcodeScannerViewfor background lifecycle events. - Test: Added unit tests covering the idempotency guarantees of the
BarcodeScannerController. - Documentation: Clarified the safe programmatic pop architecture in
PosBarcodeScannerScreen.
1.1.4 #
- Fix: Resolved an async disposal race condition in
BarcodeScannerControllerwherenotifyListeners()could fire afterdispose()if the parent widget was torn down during the UX transition padding delay. The controller now tracks its own disposal state and silently drops stale callbacks.
1.1.3 #
- Refactor (Lifecycle Management): Migrated
BarcodeScannerViewlifecycle handling fromWidgetsBindingObserverto Flutter's modernAppLifecycleListenerAPI, improving listener disposal and memory safety. - Feature (Inline Scanner): Added
stopCameraOnBackgroundparameter (defaults totrue) toBarcodeScannerView, giving developers granular control over automatic camera hardware teardown when the application transitions to background states.
1.1.2 #
- UI (Theme Isolation): Refactored internal action buttons to use primitive
MaterialandInkWellwidgets, isolating them from legacy globaluseMaterial3: falsetheme overrides in host applications. - UI (Modals): Scoped all modal bottom sheets (like the Scanned Items list) inside a clean Material 3
Themewidget to ensure perfect typography, colors, and border rendering regardless of the parent app's legacy theme matrix. - Fix: Resolved a runtime
MaterialAssertionErrorcrash caused by conflictingtypeandshapeparameters on circular buttons.
1.1.1 #
- Fix: Resolved a "zombie stream" deadlock where the barcode
EventChannelwould silently fail to receive frames after the device was locked and unlocked. - Fix (ScannerScreen): Implemented a 250ms hardware release delay on
AppLifecycleState.resumedto prevent native camera lockups, securely guarded by the_isPoppingtripwire. - UX (Inline Scanner): The
BarcodeScannerViewnow automatically closes its UI and safely detaches from the sensor when the app goes to the background, improving user privacy and preventing battery drain.
1.1.0 #
- Feature: Added
ScannerLensTypeenum to provide hardware-level control over the physical camera lens. Prevents autofocus "jumping" on iOS Pro models by allowing developers to lock the ultra-wide lens. - Feature: Exposed the
initialZoomparameter across all scanner entry points. Defaulted tonullto respect native OS behaviors. - Refactor: Completely restructured internal package architecture into strict domain folders (
inline_scanner,scanner_screen,prebuilt_screens, andwidgets). - Documentation: Added comprehensive, production-grade DartDocs to all public APIs, detailing hardware fragmentation warnings and architecture requirements.
1.0.2 #
- Feature: Added idempotent
start()andstop()methods toBarcodeScannerControllerfor safer programmatic lifecycle control. - Fix: Resolved a microtask collision and debug-mode breakpoint caused by OS Camera Permission dialogs interrupting the camera boot sequence.
- UI Refactor: Generalized
BarcodeScannerView. Replaced hardcoded UI constraints by exposingborderRadius, removing redundant clipping masks, and enforcing compositional padding. - Polish: Upgraded internal logs to strict enterprise format and improved public API DartDocs.
1.0.1 #
- Fix pub.flutter-io.cn description length warning to improve search engine SEO and package scoring.
1.0.0 #
- Initial Stable Release of
camera_scanner_kit. - 9-in-1 Routing Matrix: Modular API providing 9 scanning combinations (Single Scan, Batch accumulation, and real-time Stream routing across Custom, Barcode, and QR Code views).
- POS Mode: Dedicated
PosBarcodeScannerScreenfeaturing built-in quantity adjustment controls (+/-), success/error haptic feedback, and a reactive badge showing scanned item summaries in a sheet. - Inline Mode: Embeddable, inline
BarcodeScannerViewwith smooth collapsible window blind animations, flashlight toggles, and automatic teardown on inactivity timeout. - Teardown & Lifecycle Protection: Hardware-safe tripwire system to prevent deactivated-widget crashes, ghost scans, and camera locks across Android and iOS lifecycle transitions.
0.0.0 #
- Internal Alpha Release.
- Extracted core scanning logic into a modular package architecture.
- Implemented 9-in-1 routing matrix (Single, Batch, Stream, etc.).
- Added
PosBarcodeScannerScreenwith quantity increment/decrement controls. - Standardized UI components (Overlays, Connected Toolbars, Error Widgets).
- Prepended library logs with
[CameraScannerKit]for easier debugging.