Releases: juliansteenbakker/mobile_scanner
Releases · juliansteenbakker/mobile_scanner
v5.2.0
This release requires Flutter 3.22.0 and Dart 3.4.
- [Android] Fixed a leak of the barcode scanner.
- [Android] Fixed a crash when encountering invalid numbers for the scan window.
- [Web] Migrates
package:webto 1.0.0.
v5.1.1
This release fixes an issue with automatic starts in the examples.
v5.1.0
This updates reverts a few breaking changes made in v5.0.0 in order to keep things simple.
- The
onDetectmethod has been reinstated in theMobileScannerwidget, but is nullable. You can
still listen toMobileScannerController.barcodesdirectly by passing null to this parameter. - The
autoStartattribute has been reinstated in theMobileScannerControllerand defaults to true. However, if you want
to control which camera is used on start, or you want to manage the lifecycle yourself, you should set
autoStart to false and manually callMobileScannerController.start({CameraFacing? cameraDirection}). - The
controlleris no longer required in theMobileScannerwidget. However if provided, the user should take care
of disposing it. - [Android] Revert Gradle 8 back to Gradle 7, to be inline with most Flutter plugins and prevent build issues.
- [Android] Revert Kotlin back from 1.9 to 1.7 to be inline with most Flutter plugins. Special 1.9 functionality
has been refactored to be compatible with 1.7.
v5.0.2
Bugs fixed:
- Fixed a crash when the controller is disposed while it is still starting. #1036 (thanks @EArminjon !)
- Fixed an issue that causes the initial torch state to be out of sync.
Improvements:
- Updated the lifeycle code sample to handle not-initialized controllers.
v5.0.1
Improvements:
- Adjusted the platform checks to use the defaultTargetPlatform API, so that tests can use the correct platform overrides.
v5.0.0
This major release contains all the changes from the 5.0.0 beta releases, along with the following changes:
Improvements:
- [Android] Remove the Kotlin Standard Library from the dependencies, as it is automatically included in Kotlin 1.4+
v5.0.0-beta.3
BREAKING CHANGES:
- Flutter 3.19.0 is now required.
- [iOS] iOS 12.0 is now the minimum supported iOS version.
- [iOS] Adds a Privacy Manifest.
Bugs fixed:
- Fixed an issue where the camera preview and barcode scanner did not work the second time on web.
Improvements:
- [web] Migrates to extension types. (thanks @koji-1009 !)
v5.0.0-beta.2
Bugs fixed:
- Fixed an issue where the scan window was not updated when its size was changed. (thanks @navaronbracke !)
v5.0.0-beta.1
BREAKING CHANGES:
- The
widthandheightofBarcodeCapturehave been removed, in favor ofsize. - The
rawattribute is nowObject?instead ofdynamic, so that it participates in type promotion. - The
MobileScannerArgumentsclass has been removed from the public API, as it is an internal type. - The
cameraFacingOverridenamed argument for thestart()method has been renamed tocameraDirection. - The
analyzeImagefunction now correctly returns aBarcodeCapture?instead of a boolean. - The
formatsattribute of theMobileScannerControlleris now non-null. - The
MobileScannerStateenum has been renamed toMobileScannerAuthorizationState. - The various
ValueNotifiers for the camera state have been removed. Use thevalueof theMobileScannerControllerinstead. - The
hasTorchgetter has been removed. Instead, use the torch state of the controller's value.
TheTorchStateenum now provides a new value for unavailable flashlights. - The
autoStartattribute has been removed from theMobileScannerController. The controller should be manually started on-demand. - A controller is now required for the
MobileScannerwidget. - The
onPermissionSet,onStartandonScannerStartedmethods have been removed from theMobileScannerwidget. Instead, awaitMobileScannerController.start(). - The
startDelayhas been removed from theMobileScannerwidget. Instead, use a delay between manual starts of one or more controllers. - The
onDetectmethod has been removed from theMobileScannerwidget. Instead, listen toMobileScannerController.barcodesdirectly. - The
overlaywidget of theMobileScannerhas been replaced by a new property,overlayBuilder, which provides the constraints for the overlay. - The torch can no longer be toggled on the web, as this is only available for image tracks and not video tracks. As a result the torch state for the web will always be
TorchState.unavailable. - The zoom scale can no longer be modified on the web, as this is only available for image tracks and not video tracks. As a result, the zoom scale will always be
1.0.
Improvements:
- The
MobileScannerControlleris now a ChangeNotifier, withMobileScannerStateas its model. - The web implementation now supports alternate URLs for loading the barcode library.
v4.0.1
Bugs fixed:
[iOS] Fixed a crash with a nil capture session when starting the camera. (thanks @navaronbracke !)