Showing
2 changed files
with
7 additions
and
0 deletions
| @@ -268,6 +268,7 @@ class MobileScannerController extends ValueNotifier<MobileScannerState> { | @@ -268,6 +268,7 @@ class MobileScannerController extends ValueNotifier<MobileScannerState> { | ||
| 268 | formats: formats, | 268 | formats: formats, |
| 269 | returnImage: returnImage, | 269 | returnImage: returnImage, |
| 270 | torchEnabled: torchEnabled, | 270 | torchEnabled: torchEnabled, |
| 271 | + useNewCameraSelector: useNewCameraSelector, | ||
| 271 | ); | 272 | ); |
| 272 | 273 | ||
| 273 | try { | 274 | try { |
| @@ -14,6 +14,7 @@ class StartOptions { | @@ -14,6 +14,7 @@ class StartOptions { | ||
| 14 | required this.formats, | 14 | required this.formats, |
| 15 | required this.returnImage, | 15 | required this.returnImage, |
| 16 | required this.torchEnabled, | 16 | required this.torchEnabled, |
| 17 | + required this.useNewCameraSelector, | ||
| 17 | }); | 18 | }); |
| 18 | 19 | ||
| 19 | /// The direction for the camera. | 20 | /// The direction for the camera. |
| @@ -37,6 +38,10 @@ class StartOptions { | @@ -37,6 +38,10 @@ class StartOptions { | ||
| 37 | /// Whether the torch should be turned on when the scanner starts. | 38 | /// Whether the torch should be turned on when the scanner starts. |
| 38 | final bool torchEnabled; | 39 | final bool torchEnabled; |
| 39 | 40 | ||
| 41 | + /// Only supported on Android. | ||
| 42 | + /// Whether the new resolution selector should be used. | ||
| 43 | + final bool useNewCameraSelector; | ||
| 44 | + | ||
| 40 | Map<String, Object?> toMap() { | 45 | Map<String, Object?> toMap() { |
| 41 | return <String, Object?>{ | 46 | return <String, Object?>{ |
| 42 | if (cameraResolution != null) | 47 | if (cameraResolution != null) |
| @@ -51,6 +56,7 @@ class StartOptions { | @@ -51,6 +56,7 @@ class StartOptions { | ||
| 51 | 'speed': detectionSpeed.rawValue, | 56 | 'speed': detectionSpeed.rawValue, |
| 52 | 'timeout': detectionTimeoutMs, | 57 | 'timeout': detectionTimeoutMs, |
| 53 | 'torch': torchEnabled, | 58 | 'torch': torchEnabled, |
| 59 | + 'useNewCameraSelector': useNewCameraSelector, | ||
| 54 | }; | 60 | }; |
| 55 | } | 61 | } |
| 56 | } | 62 | } |
-
Please register or login to post a comment