add isScanning to the barcode scanner web interface & remove hasTorch
Showing
1 changed file
with
3 additions
and
6 deletions
| @@ -3,7 +3,6 @@ import 'dart:js_interop'; | @@ -3,7 +3,6 @@ import 'dart:js_interop'; | ||
| 3 | 3 | ||
| 4 | import 'package:js/js.dart'; | 4 | import 'package:js/js.dart'; |
| 5 | import 'package:mobile_scanner/src/enums/mobile_scanner_error_code.dart'; | 5 | import 'package:mobile_scanner/src/enums/mobile_scanner_error_code.dart'; |
| 6 | -import 'package:mobile_scanner/src/enums/torch_state.dart'; | ||
| 7 | import 'package:mobile_scanner/src/mobile_scanner_exception.dart'; | 6 | import 'package:mobile_scanner/src/mobile_scanner_exception.dart'; |
| 8 | import 'package:mobile_scanner/src/objects/barcode_capture.dart'; | 7 | import 'package:mobile_scanner/src/objects/barcode_capture.dart'; |
| 9 | import 'package:mobile_scanner/src/objects/start_options.dart'; | 8 | import 'package:mobile_scanner/src/objects/start_options.dart'; |
| @@ -13,6 +12,9 @@ import 'package:web/web.dart'; | @@ -13,6 +12,9 @@ import 'package:web/web.dart'; | ||
| 13 | abstract class BarcodeReader { | 12 | abstract class BarcodeReader { |
| 14 | const BarcodeReader(); | 13 | const BarcodeReader(); |
| 15 | 14 | ||
| 15 | + /// Whether the scanner is currently scanning for barcodes. | ||
| 16 | + bool get isScanning; | ||
| 17 | + | ||
| 16 | /// The id for the script tag that loads the barcode library. | 18 | /// The id for the script tag that loads the barcode library. |
| 17 | /// | 19 | /// |
| 18 | /// If a script tag with this id already exists, | 20 | /// If a script tag with this id already exists, |
| @@ -75,11 +77,6 @@ abstract class BarcodeReader { | @@ -75,11 +77,6 @@ abstract class BarcodeReader { | ||
| 75 | await completer.future; | 77 | await completer.future; |
| 76 | } | 78 | } |
| 77 | 79 | ||
| 78 | - /// Set the flashlight state for the device. | ||
| 79 | - Future<void> setTorchState(TorchState torchState) { | ||
| 80 | - throw UnimplementedError('setTorchState() has not been implemented.'); | ||
| 81 | - } | ||
| 82 | - | ||
| 83 | /// Start the barcode reader and initialize the video stream. | 80 | /// Start the barcode reader and initialize the video stream. |
| 84 | /// | 81 | /// |
| 85 | /// The [options] are used to configure the barcode reader. | 82 | /// The [options] are used to configure the barcode reader. |
-
Please register or login to post a comment