Skip to content

Releases: juliansteenbakker/mobile_scanner

v7.2.0

18 Feb 22:17
1fa5863

Choose a tag to compare

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

24 Oct 08:46

Choose a tag to compare

  • 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

24 Oct 08:19

Choose a tag to compare

  • Fixed an issue with the initialZoom parameter.

v7.1.1

23 Sep 17:14

Choose a tag to compare

  • Fixed missing import of 'package:meta/meta.dart' on older Flutter sdk's

v7.1.0

23 Sep 14:10

Choose a tag to compare

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

22 Sep 19:18

Choose a tag to compare

  • [Android] Update camerax dependencies to support 16KB pages sizes.

v7.0.1

04 Jun 08:15

Choose a tag to compare

  • Added error handling for when MobileScannerController.start is called without an active MobileScanner widget.

v7.0.0

02 May 08:19
0c9b959

Choose a tag to compare

This version finalizes all changes from the beta and release candidate cycles and introduces major improvements, bug fixes, and breaking changes.

BREAKING CHANGES:

  • Requires Flutter 3.29.0 or higher.
  • The initial camera facing direction in MobileScannerState is now CameraFacing.unknown.
  • Removed the deprecated EncryptionType.none. Use EncryptionType.unknown instead.
  • The errorBuilder and placeholderBuilder no longer have a Widget argument.
  • Removed the MobileScannerErrorBuilder typedef.

Highlights

  • [iOS/macOS] Migrated to the Vision API with a unified Apple codebase.
  • [Android] Removed dependency on kotlin-bom and updated CameraX and camera-camera2 dependencies.
  • Support for pause/resume functionality across platforms.
  • MobileScannerErrorCode now includes readable error messages in debug mode.
  • Hot-restart during development now works correctly.
  • Added overlay widgets for barcode and scan window visualization.
  • Exposed new API parameters like autoZoom, invertImage, and lifecycle handling.

Bug Fixes and Improvements

  • [Apple]
    • Fixed rotation, orientation, and zoom behavior.
    • Resolved incorrect barcode overlay dimensions and corner coordinates.
    • Fixed a crash when stopping the camera with a nil device.
    • Fixed build issues including optional chaining on non-optional values.
  • [Android]
    • Fixed rotation and orientation issues.
    • Resolved timing issues in SurfaceProducer with Kotlin 1.8+.
    • Fixed resource leaks and improved image analysis compatibility.
    • Improved logging behavior (CameraX logs only errors).
  • [macOS]
    • Fixed mirrored images and build issues.
  • [Web]
    • Fixed barcode overlay not displaying due to incorrect corner point data.

v7.0.0-rc.2

24 Apr 08:02

Choose a tag to compare

v7.0.0-rc.2 Pre-release
Pre-release

Bugs fixed:

  • [Apple] Fixed build issues "Cannot use optional chaining on non-optional value".

v7.0.0-rc.1

23 Apr 12:40

Choose a tag to compare

v7.0.0-rc.1 Pre-release
Pre-release

After six months of development, Version 7.0.0 is finally moving out of beta with this release candidate!
A stable release is scheduled for next week.

Improvements:

  • [Android] Remove the dependency on org.jetbrains.kotlin:kotlin-bom.
  • [Android] Updated camerax dependencies.
  • Hot-restart for development purposes is now working correctly
  • Added message to MobileScannerErrorCode, which will be shown if kDebugMode is true. Otherwise, a generic error message will appear.
  • Fixed issues regarding initialization of the MobileScannerController, which could result in a black screen without error message.

Bugs fixed:

  • [Android] Fixed rotation & orientation issues.
  • [Apple] Fixed rotation & orientation issues.
  • [Apple] Fixed a crash when stopping the camera when the camera device is nil.
  • [macOS] Fixed image not being mirrored.
  • [Web] Fixed barcode corners not being passed correctly resulting in no overlay being drawn.