Showing
1 changed file
with
5 additions
and
2 deletions
| @@ -301,8 +301,11 @@ class MobileScannerController { | @@ -301,8 +301,11 @@ class MobileScannerController { | ||
| 301 | /// is zoomed out. | 301 | /// is zoomed out. |
| 302 | Future<void> setZoomScale(double zoomScale) async { | 302 | Future<void> setZoomScale(double zoomScale) async { |
| 303 | if (zoomScale < 0 || zoomScale > 1) { | 303 | if (zoomScale < 0 || zoomScale > 1) { |
| 304 | - throw MobileScannerException( | ||
| 305 | - 'The zoomScale must be between 0 and 1.', | 304 | + throw const MobileScannerException( |
| 305 | + errorCode: MobileScannerErrorCode.genericError, | ||
| 306 | + errorDetails: MobileScannerErrorDetails( | ||
| 307 | + message: 'The zoomScale must be between 0 and 1.', | ||
| 308 | + ), | ||
| 306 | ); | 309 | ); |
| 307 | } | 310 | } |
| 308 | await _methodChannel.invokeMethod('setScale', zoomScale); | 311 | await _methodChannel.invokeMethod('setScale', zoomScale); |
-
Please register or login to post a comment