v5.0.0-beta.1
Pre-release
Pre-release
juliansteenbakker
released this
23 Apr 13:44
·
289 commits
to master
since this release
BREAKING CHANGES:
- The
width
andheight
ofBarcodeCapture
have been removed, in favor ofsize
. - The
raw
attribute is nowObject?
instead ofdynamic
, so that it participates in type promotion. - The
MobileScannerArguments
class has been removed from the public API, as it is an internal type. - The
cameraFacingOverride
named argument for thestart()
method has been renamed tocameraDirection
. - The
analyzeImage
function now correctly returns aBarcodeCapture?
instead of a boolean. - The
formats
attribute of theMobileScannerController
is now non-null. - The
MobileScannerState
enum has been renamed toMobileScannerAuthorizationState
. - The various
ValueNotifier
s for the camera state have been removed. Use thevalue
of theMobileScannerController
instead. - The
hasTorch
getter has been removed. Instead, use the torch state of the controller's value.
TheTorchState
enum now provides a new value for unavailable flashlights. - The
autoStart
attribute has been removed from theMobileScannerController
. The controller should be manually started on-demand. - A controller is now required for the
MobileScanner
widget. - The
onPermissionSet
,onStart
andonScannerStarted
methods have been removed from theMobileScanner
widget. Instead, awaitMobileScannerController.start()
. - The
startDelay
has been removed from theMobileScanner
widget. Instead, use a delay between manual starts of one or more controllers. - The
onDetect
method has been removed from theMobileScanner
widget. Instead, listen toMobileScannerController.barcodes
directly. - The
overlay
widget of theMobileScanner
has 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
MobileScannerController
is now a ChangeNotifier, withMobileScannerState
as its model. - The web implementation now supports alternate URLs for loading the barcode library.