Showing
1 changed file
with
8 additions
and
0 deletions
| @@ -5,6 +5,7 @@ import 'package:js/js.dart'; | @@ -5,6 +5,7 @@ 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'; | 6 | import 'package:mobile_scanner/src/enums/torch_state.dart'; |
| 7 | import 'package:mobile_scanner/src/mobile_scanner_exception.dart'; | 7 | import 'package:mobile_scanner/src/mobile_scanner_exception.dart'; |
| 8 | +import 'package:mobile_scanner/src/objects/barcode_capture.dart'; | ||
| 8 | import 'package:mobile_scanner/src/objects/start_options.dart'; | 9 | import 'package:mobile_scanner/src/objects/start_options.dart'; |
| 9 | import 'package:web/web.dart'; | 10 | import 'package:web/web.dart'; |
| 10 | 11 | ||
| @@ -21,6 +22,13 @@ abstract class BarcodeReader { | @@ -21,6 +22,13 @@ abstract class BarcodeReader { | ||
| 21 | /// The script url for the barcode library. | 22 | /// The script url for the barcode library. |
| 22 | String get scriptUrl; | 23 | String get scriptUrl; |
| 23 | 24 | ||
| 25 | + /// Start detecting barcodes. | ||
| 26 | + /// | ||
| 27 | + /// The returned stream will emit a [BarcodeCapture] for each detected barcode. | ||
| 28 | + Stream<BarcodeCapture> detectBarcodes() { | ||
| 29 | + throw UnimplementedError('detectBarcodes() has not been implemented.'); | ||
| 30 | + } | ||
| 31 | + | ||
| 24 | /// Load the barcode reader library. | 32 | /// Load the barcode reader library. |
| 25 | /// | 33 | /// |
| 26 | /// Does nothing if the library is already loaded. | 34 | /// Does nothing if the library is already loaded. |
-
Please register or login to post a comment