Julian Steenbakker

doc: update readme with better explanation of v5.0.0

Showing 1 changed file with 22 additions and 3 deletions
@@ -7,9 +7,28 @@ @@ -7,9 +7,28 @@
7 7
8 A universal scanner for Flutter based on MLKit. Uses CameraX on Android and AVFoundation on iOS. 8 A universal scanner for Flutter based on MLKit. Uses CameraX on Android and AVFoundation on iOS.
9 9
10 -## Breaking Changes V5.0.0  
11 -  
12 -Version 5.0.0 brings some breaking changes. Please see the changelog for an overview. 10 +## Breaking Changes v5.0.0
  11 +
  12 +Version 5.0.0 brings some breaking changes. However, some are reverted in version 5.1.0. Please see the list below for all breaking changes, and Changelog.md for a more detailed list.
  13 +
  14 +* The `width` and `height` of `BarcodeCapture` have been removed, in favor of `size`.
  15 +* The `raw` attribute is now `Object?` instead of `dynamic`, so that it participates in type promotion.
  16 +* The `MobileScannerArguments` class has been removed from the public API, as it is an internal type.
  17 +* The `cameraFacingOverride` named argument for the `start()` method has been renamed to `cameraDirection`.
  18 +* The `analyzeImage` function now correctly returns a `BarcodeCapture?` instead of a boolean.
  19 +* The `formats` attribute of the `MobileScannerController` is now non-null.
  20 +* The `MobileScannerState` enum has been renamed to `MobileScannerAuthorizationState`.
  21 +* The various `ValueNotifier`s for the camera state have been removed. Use the `value` of the `MobileScannerController` instead.
  22 +* The `hasTorch` getter has been removed. Instead, use the torch state of the controller's value.
  23 + The `TorchState` enum now provides a new value for unavailable flashlights.
  24 +~~* The `autoStart` attribute has been removed from the `MobileScannerController`. The controller should be manually started on-demand.~~ (Reverted in version 5.1.0)
  25 +~~* A controller is now required for the `MobileScanner` widget.~~ (Reverted in version 5.1.0)
  26 +* The `onPermissionSet`, `onStart` and `onScannerStarted` methods have been removed from the `MobileScanner` widget. Instead, await `MobileScannerController.start()`.
  27 +* The `startDelay` has been removed from the `MobileScanner` widget. Instead, use a delay between manual starts of one or more controllers.
  28 +~~* The `onDetect` method has been removed from the `MobileScanner` widget. Instead, listen to `MobileScannerController.barcodes` directly.~~ (Reverted in version 5.1.0)
  29 +* The `overlay` widget of the `MobileScanner` has been replaced by a new property, `overlayBuilder`, which provides the constraints for the overlay.
  30 +* 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`.
  31 +* 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`.
13 32
14 ## Features Supported 33 ## Features Supported
15 34