Releases: juliansteenbakker/mobile_scanner
Release list
v7.4.0
7.4.0 (2026-07-19)
New features
- Added
getBestCloseRangeScanningLens()to determine which camera lens is best suited for scanning barcodes at close range (e.g. the ultra-wide/macro lens on newer iPhones). Returnsnullif no camera is available for the requested facing direction.
Improvements
- Added an optional
facingfilter togetSupportedLenses, to restrict results to front or back cameras.
Bug Fixes
- [Android] Fixed
getSupportedLensesreporting physical sub-cameras that CameraX can't actually select, which caused a crash when switching to one. - [Android] Starting the scanner with an unavailable
lensTypenow reports an error instead of silently falling back to the default camera.
v7.3.1
7.3.1
Bug Fixes
- Bumped the minimum required version of the
webpackage to1.0.0.
v7.3.0
New features
- [Web] Added support for multiple barcode detection backends, selectable via
MobileScannerPlatform.instance.setWebBarcodeReader(WebBarcodeReader reader):WebBarcodeReader.auto(default), uses the nativeBarcodeDetectorAPI when available, and falls back tozxing-wasmotherwise.WebBarcodeReader.barcodeDetector, uses the W3C Shape Detection API (Chrome 83+, Edge 83+, Safari 17+). No external library is loaded.WebBarcodeReader.zxingWasm, uses zxing-wasm (ZXing C++ compiled to WebAssembly), which works in all modern browsers including Firefox.WebBarcodeReader.zxingJs, the legacy ZXing JavaScript backend, retained for backward compatibility.
- [Web] Added
MobileScannerPlatform.instance.activeWebReaderto query which backend is currently active. - Added
BarcodeFormat.maxiCodeandBarcodeFormat.microQrCode, supported by theWebBarcodeReader.zxingJsandWebBarcodeReader.zxingWasmbackends. - Added
BarcodeFormat.dataBar,BarcodeFormat.dataBarExpandedandBarcodeFormat.dataBarLimited(GS1 DataBar / RSS-14), supported by theWebBarcodeReader.zxingJsandWebBarcodeReader.zxingWasmbackends (DataBar and DataBar Expanded only forzxingJs), and by Apple Vision on iOS 15+ / macOS 12+.
Improvements
- [Web] Bumped
@zxing/library(theWebBarcodeReader.zxingJsbackend) from 0.21.3 to 0.23.0.
Bug Fixes
- Fixed disposing a
MobileScannerControlleralso disposing the platform resources of a different controller. Disposing a controller that does not hold the active camera session no longer tears down the camera of the controller that does. (#1631) - Fixed a subscription leak where a controller that was disposed without being stopped kept its internal event stream subscriptions alive.
- Fixed an issue when running the plugin using AGP 9.
v7.2.1
Improvements
- [Web] The preferred camera device ID is now persisted in localStorage and reused on the next start.
- [Web] Focus, exposure, and white-balance constraints are now applied automatically when supported by the browser (Image Capture API).
- [Web] The camera now uses
StartOptions.cameraResolutionas the ideal resolution, falling back to 1920×1080. - [Web] The barcode overlay is now mirrored when the video preview is mirrored (e.g. front camera).
- [Web] The scan window is now supported. Barcodes detected outside the scan window are ignored.
- [Android] Laid groundwork for Android Gradle Plugin (AGP) 9 compatibility by conditionally applying the
kotlin-androidplugin only on AGP versions below 9, while remaining compatible with older AGP versions.
Bug Fixes
- [Apple] Fixed a race condition in
captureOutputwherelatestBufferwas read on a background thread after being deallocated on the main thread, causing a crash inVTCreateCGImageFromCVPixelBuffer. - [Apple] Fixed an issue where
captureOutputwas being processed on the main thread, causing overheating issues on device. - [Android] Fixed
start()not resuming the camera afterpause(), caused by theisPausedflag being reset before the paused-state check. - [Android] Fixed ProGuard/R8 full mode (default since AGP 8.0) stripping or obfuscating MLKit classes by widening the keep rule to
com.google.mlkit.**.
v7.2.0
Highlights
- Added support for switching between lens types (normal, wide, zoom) using the
switchCamera()method withToggleLensTypeorSelectCameraoptions. - Added
rawDecodedBytesfield toBarcodewhich replacesBarcode.rawBytes. On Apple platforms, this returns aDecodedVisionBarcodeBytescontainingbytes(decoded payload, without header/padding) andrawBytes(full raw payload, available on iOS 17.0+ / macOS 14.0+). On Android and web, this returns aDecodedBarcodeBytescontainingbytes.
Improvements
- [Android] Migrated barcode bounding box from
boundingBoxtocornerPointsfor more accurate scan window detection. - Added support for
ITF-Two-of-Five. - Added constants for testing the method channel methods in
MobileScannerMethodsandMobileScannerEvents. - The global method
calculateBoxFitRatio()is now deprecated.
Bug Fixes
- [Android] Fixed incorrect texture size on orientation change.
- [Android] Fixed a bug where the
isPausedflag was not reset whenstart()was called. - [Android] Fixed
imageAnalysisnot being unbound on dispose. - [Android] Fixed an issue where the app orientation handling was not respecting auto-rotate settings
- [Apple] Fixed
rawBytesreturning incorrect data for barcodes containing non-ASCII characters (e.g.ø). For QR codes, bytes are now extracted directly from the error-corrected bit stream viaCIQRCodeDescriptor, bypassing the Vision string API entirely. For Aztec, DataMatrix, PDF417 and linear formats, the ISO-Latin-1 round-trip is used to recover the original bytes frompayloadStringValue. - [Apple] Fixed
displayValuereturning a garbled Latin-1 string (e.g.hellø) for barcodes with non-ASCII UTF-8 content. It is now correctly decoded to UTF-8 (e.g.hellø). - [Apple] Fixed a bug where the barcode type results did not have a value.
- [Apple] Fixed camera rotating, even when rotation is locked.
- [macOS] Fixed barcode overlay text displaying upside down.
- Fixed barcode overlay rendering at wrong position after orientation change.
- Fixed a bug where taps were ignored on the scanner widget.
- Fixed a bug where a controller that was only disposed would throw an incorrect error code.
v7.1.3
-
Overlay: Updated
BarcodePainterto receivedeviceOrientationand dynamically adjustcameraPreviewSize, fixing barcode overlay misalignment during device rotation changes . -
[Android] Refactored orientation detection to use
OrientationEventListenerinstead ofBroadcastReceiverforACTION_CONFIGURATION_CHANGED, ensuring physical device orientation is captured correctly and preventing unwanted screen rotations onMobileScannerinitialization . -
[Android] Changed minSDK from 21 to 23 in line with Flutter requirements.
-
[Android] Removed deprecated renderscript api's, improved performance for analysis.
-
[Apple] Prevent half-stopped camera state causing false ALREADY_STARTED.
-
[Apple] Fixed a bug where invalid images would cause crashes when processing them with CoreVideo.
v7.1.2
- Fixed an issue with the
initialZoomparameter.
v7.1.1
- Fixed missing import of 'package:meta/meta.dart' on older Flutter sdk's
v7.1.0
Highlights
- [Apple & Android] Added tap to focus functionality. You can enable it in the
MobileScannerwidget. - [Apple & Android] You can now set the initial zoom factor using the
initialZoomparameter in thestartOptions.
Bug Fixes and Improvements
- [iOS] Increased minimum os level to 13 due to Flutter requirements.
- [macOS] Increased minimum os level to 10.15 due to Flutter requirements.
- [Android] Update to Java 17, and update other dependencies.
- [Apple] Improved fallback for when camera is not found.
- Added a
Barcode.scaleCorners()method.
v6.0.11
- [Android] Update camerax dependencies to support 16KB pages sizes.