Releases: juliansteenbakker/mobile_scanner
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.
v7.0.1
- Added error handling for when
MobileScannerController.startis called without an activeMobileScannerwidget.
v7.0.0
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
MobileScannerStateis nowCameraFacing.unknown. - Removed the deprecated
EncryptionType.none. UseEncryptionType.unknowninstead. - The
errorBuilderandplaceholderBuilderno longer have a Widget argument. - Removed the
MobileScannerErrorBuildertypedef.
Highlights
- [iOS/macOS] Migrated to the Vision API with a unified Apple codebase.
- [Android] Removed dependency on
kotlin-bomand updated CameraX and camera-camera2 dependencies. - Support for pause/resume functionality across platforms.
MobileScannerErrorCodenow 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
SurfaceProducerwith 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
Bugs fixed:
- [Apple] Fixed build issues "Cannot use optional chaining on non-optional value".
v7.0.0-rc.1
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.