Skip to content

Releases: juliansteenbakker/mobile_scanner

v7.4.0

Choose a tag to compare

@github-actions github-actions released this 20 Jul 06:19

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). Returns null if no camera is available for the requested facing direction.

Improvements

  • Added an optional facing filter to getSupportedLenses, to restrict results to front or back cameras.

Bug Fixes

  • [Android] Fixed getSupportedLenses reporting physical sub-cameras that CameraX can't actually select, which caused a crash when switching to one.
  • [Android] Starting the scanner with an unavailable lensType now reports an error instead of silently falling back to the default camera.

v7.3.1

Choose a tag to compare

@github-actions github-actions released this 19 Jul 12:28
8ae455d

7.3.1

Bug Fixes

  • Bumped the minimum required version of the web package to 1.0.0.

v7.3.0

Choose a tag to compare

@juliansteenbakker juliansteenbakker released this 16 Jul 14:21

New features

  • [Web] Added support for multiple barcode detection backends, selectable via MobileScannerPlatform.instance.setWebBarcodeReader(WebBarcodeReader reader):
    • WebBarcodeReader.auto (default), uses the native BarcodeDetector API when available, and falls back to zxing-wasm otherwise.
    • 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.activeWebReader to query which backend is currently active.
  • Added BarcodeFormat.maxiCode and BarcodeFormat.microQrCode, supported by the WebBarcodeReader.zxingJs and WebBarcodeReader.zxingWasm backends.
  • Added BarcodeFormat.dataBar, BarcodeFormat.dataBarExpanded and BarcodeFormat.dataBarLimited (GS1 DataBar / RSS-14), supported by the WebBarcodeReader.zxingJs and WebBarcodeReader.zxingWasm backends (DataBar and DataBar Expanded only for zxingJs), and by Apple Vision on iOS 15+ / macOS 12+.

Improvements

  • [Web] Bumped @zxing/library (the WebBarcodeReader.zxingJs backend) from 0.21.3 to 0.23.0.

Bug Fixes

  • Fixed disposing a MobileScannerController also 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

Choose a tag to compare

@juliansteenbakker juliansteenbakker released this 14 Jul 20:48

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.cameraResolution as 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-android plugin only on AGP versions below 9, while remaining compatible with older AGP versions.

Bug Fixes

  • [Apple] Fixed a race condition in captureOutput where latestBuffer was read on a background thread after being deallocated on the main thread, causing a crash in VTCreateCGImageFromCVPixelBuffer.
  • [Apple] Fixed an issue where captureOutput was being processed on the main thread, causing overheating issues on device.
  • [Android] Fixed start() not resuming the camera after pause(), caused by the isPaused flag 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

Choose a tag to compare

@juliansteenbakker juliansteenbakker released this 18 Feb 22:17
1fa5863

Highlights

  • Added support for switching between lens types (normal, wide, zoom) using the switchCamera() method with ToggleLensType or SelectCamera options.
  • Added rawDecodedBytes field to Barcode which replaces Barcode.rawBytes. On Apple platforms, this returns a DecodedVisionBarcodeBytes containing bytes (decoded payload, without header/padding) and rawBytes (full raw payload, available on iOS 17.0+ / macOS 14.0+). On Android and web, this returns a DecodedBarcodeBytes containing bytes.

Improvements

  • [Android] Migrated barcode bounding box from boundingBox to cornerPoints for more accurate scan window detection.
  • Added support for ITF-Two-of-Five.
  • Added constants for testing the method channel methods in MobileScannerMethods and MobileScannerEvents.
  • The global method calculateBoxFitRatio() is now deprecated.

Bug Fixes

  • [Android] Fixed incorrect texture size on orientation change.
  • [Android] Fixed a bug where the isPaused flag was not reset when start() was called.
  • [Android] Fixed imageAnalysis not being unbound on dispose.
  • [Android] Fixed an issue where the app orientation handling was not respecting auto-rotate settings
  • [Apple] Fixed rawBytes returning incorrect data for barcodes containing non-ASCII characters (e.g. ø). For QR codes, bytes are now extracted directly from the error-corrected bit stream via CIQRCodeDescriptor, 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 from payloadStringValue.
  • [Apple] Fixed displayValue returning 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

Choose a tag to compare

@juliansteenbakker juliansteenbakker released this 24 Oct 08:46
  • Overlay: Updated BarcodePainter to receive deviceOrientation and dynamically adjust cameraPreviewSize, fixing barcode overlay misalignment during device rotation changes .

  • [Android] Refactored orientation detection to use OrientationEventListener instead of BroadcastReceiver for ACTION_CONFIGURATION_CHANGED, ensuring physical device orientation is captured correctly and preventing unwanted screen rotations on MobileScanner initialization .

  • [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

Choose a tag to compare

@juliansteenbakker juliansteenbakker released this 24 Oct 08:19
  • Fixed an issue with the initialZoom parameter.

v7.1.1

Choose a tag to compare

@juliansteenbakker juliansteenbakker released this 23 Sep 17:14
  • Fixed missing import of 'package:meta/meta.dart' on older Flutter sdk's

v7.1.0

Choose a tag to compare

@juliansteenbakker juliansteenbakker released this 23 Sep 14:10

Highlights

  • [Apple & Android] Added tap to focus functionality. You can enable it in the MobileScanner widget.
  • [Apple & Android] You can now set the initial zoom factor using the initialZoom parameter in the startOptions.

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

Choose a tag to compare

@juliansteenbakker juliansteenbakker released this 22 Sep 19:18
  • [Android] Update camerax dependencies to support 16KB pages sizes.