A universal scanner for Flutter based on MLKit. Uses CameraX on Android and AVFoundation on iOS.
BSD-3-CLAUSE License
Bot releases are visible (Hide)
This updates reverts a few breaking changes made in v5.0.0 in order to keep things simple.
onDetect
method has been reinstated in the MobileScanner
widget, but is nullable. You canMobileScannerController.barcodes
directly by passing null to this parameter.autoStart
attribute has been reinstated in the MobileScannerController
and defaults to true. However, if you wantMobileScannerController.start({CameraFacing? cameraDirection})
.controller
is no longer required in the MobileScanner
widget. However if provided, the user should take carePublished by juliansteenbakker 6 months ago
Bugs fixed:
Improvements:
Published by juliansteenbakker 6 months ago
Improvements:
Published by juliansteenbakker 6 months ago
This major release contains all the changes from the 5.0.0 beta releases, along with the following changes:
Improvements:
Published by juliansteenbakker 6 months ago
BREAKING CHANGES:
Bugs fixed:
Improvements:
Published by juliansteenbakker 6 months ago
Bugs fixed:
Published by juliansteenbakker 6 months ago
BREAKING CHANGES:
width
and height
of BarcodeCapture
have been removed, in favor of size
.raw
attribute is now Object?
instead of dynamic
, so that it participates in type promotion.MobileScannerArguments
class has been removed from the public API, as it is an internal type.cameraFacingOverride
named argument for the start()
method has been renamed to cameraDirection
.analyzeImage
function now correctly returns a BarcodeCapture?
instead of a boolean.formats
attribute of the MobileScannerController
is now non-null.MobileScannerState
enum has been renamed to MobileScannerAuthorizationState
.ValueNotifier
s for the camera state have been removed. Use the value
of the MobileScannerController
instead.hasTorch
getter has been removed. Instead, use the torch state of the controller's value.TorchState
enum now provides a new value for unavailable flashlights.autoStart
attribute has been removed from the MobileScannerController
. The controller should be manually started on-demand.MobileScanner
widget.onPermissionSet
, onStart
and onScannerStarted
methods have been removed from the MobileScanner
widget. Instead, await MobileScannerController.start()
.startDelay
has been removed from the MobileScanner
widget. Instead, use a delay between manual starts of one or more controllers.onDetect
method has been removed from the MobileScanner
widget. Instead, listen to MobileScannerController.barcodes
directly.overlay
widget of the MobileScanner
has been replaced by a new property, overlayBuilder
, which provides the constraints for the overlay.TorchState.unavailable
.1.0
.Improvements:
MobileScannerController
is now a ChangeNotifier, with MobileScannerState
as its model.Published by juliansteenbakker 6 months ago
Bugs fixed:
[iOS] Fixed a crash with a nil capture session when starting the camera. (thanks @navaronbracke !)
Published by juliansteenbakker 9 months ago
BREAKING CHANGES:
Published by juliansteenbakker 9 months ago
Improvements:
Published by juliansteenbakker 9 months ago
Bugs fixed:
Improvements:
Published by juliansteenbakker 11 months ago
Bugs fixed:
Published by juliansteenbakker 11 months ago
Bugs fixed:
Published by juliansteenbakker 11 months ago
Improvements:
play-services-mlkit-barcode-scanning
version 18.3.0Bugs fixed:
updateScanWindow()
function not completing on Android and MacOS. (thanks @navaronbracke !)noDuplicates
detection speed. (thanks @pgeof !)Published by juliansteenbakker 11 months ago
Improvements:
type
of an Address
is now non-null.type
of an Email
is now non-null.phoneNumber
of an SMS
is now non-null.latitude
and longitude
of a GeoPoint
are now non-null.phones
and urls
of ContactInfo
are now non-null.url
of a UrlBookmark
is now non-null.type
of Phone
is now non-null.width
and height
of BarcodeCapture
are now non-null.BarcodeCapture
class now exposes a size
.corners
of a Barcode
is now non-null.Bugs fixed:
format
and type
arguments of the Barcode constructor.BarcodeFormat.unknown
and BarcodeType.unknown
, rather than BarcodeFormat.ean13
and BarcodeType.text
.Published by juliansteenbakker 11 months ago
New Features:
Bugs fixed:
Improvements:
Published by juliansteenbakker about 1 year ago
Change MediaQuery.sizeOf(context) to of(context).size for backwards compatibility
Published by juliansteenbakker about 1 year ago
New Features:
Improvements:
fix a bug in the static interop binding of PhotoCapabilities (thanks @navaronbracke !)
[Web] add the corners from the ZXing result to the barcode on web (thanks @navaronbracke !)
update the example app web entrypoint to the latest template by running flutter create . --platforms=web (thanks @navaronbracke !)
add better handling for the case where scanning barcodes is unsupported (for example a desktop running the browser sample) (thanks @navaronbracke !)
[Web] fix the permission denied handling on the web, by using the NotAllowedError error message as defined by MDN (thanks @navaronbracke !)
add app bars with back buttons to the example app (so that you can go back easily) (thanks @navaronbracke !)
[iOS] Implements a fix from issue iOS After first QR Code Scan, When Scanning again, First Image stays on Camera buffer (thanks @FlockiiX !)
By dynamically adjusting the positioning and scaling of the scan window relative to the texture, the package ensures optimal coverage and alignment for scanning targets. (thanks @sdkysfzai !)
In the original package, If there are multiple barcode/qrcodes in the screen, the scan would randomly pick up any barcode/qrcode that shows in the screen, This upgrade fixes it and picks on the qrcode/barcode that is in the center of the camera. (thanks @sdkysfzai !)
In the original package if you changed the camera size, it would still pick scans even if the barcode are not shown in the screen, This issue is also fixed in the upgraded packaged. (thanks @sdkysfzai !)
[iOS] This removes a threading warning (and potentially jank). (thanks @ened !)
[Android] fix(ScanImage): fix android image result is not correct format and orientation (thanks @phanbaohuy96 !)
[iOS] Respect detectionTimeout on iOS devices, instead of arbitrarily waiting 10 frames (thanks @jorgenpt !)
[iOS] Don't start a second scan until the first one is done, to keep memory usage more fixed if the device is slow (thanks @jorgenpt !)
[Android] This PR ensure that the camera is not stopped in the callback. (thanks @g123k !)
[macOS] Fix some macOS build errors (thanks @svenopdehipt !)
[Android] Fixed an issue which caused the App Lifecycle States to not work correctly on Android. (thanks @androi7 !)
Published by juliansteenbakker over 1 year ago
Bugs fixed:
namespace
attribute to the build.gradle.Improvements:
Published by juliansteenbakker over 1 year ago
Improvements:
Bugs fixed: