Showing
1 changed file
with
9 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/start_options.dart'; | ||
| 8 | import 'package:web/web.dart'; | 9 | import 'package:web/web.dart'; |
| 9 | 10 | ||
| 10 | /// This class represents the base interface for a barcode reader implementation. | 11 | /// This class represents the base interface for a barcode reader implementation. |
| @@ -71,6 +72,14 @@ abstract class BarcodeReader { | @@ -71,6 +72,14 @@ abstract class BarcodeReader { | ||
| 71 | throw UnimplementedError('setTorchState() has not been implemented.'); | 72 | throw UnimplementedError('setTorchState() has not been implemented.'); |
| 72 | } | 73 | } |
| 73 | 74 | ||
| 75 | + /// Start the barcode reader and initialize the video stream. | ||
| 76 | + /// | ||
| 77 | + /// The [options] are used to configure the barcode reader. | ||
| 78 | + /// The [containerElement] will become the parent of the video output element. | ||
| 79 | + Future<void> start(StartOptions options, {required HTMLElement containerElement}) { | ||
| 80 | + throw UnimplementedError('start() has not been implemented.'); | ||
| 81 | + } | ||
| 82 | + | ||
| 74 | /// Stop the barcode reader and dispose of the video stream. | 83 | /// Stop the barcode reader and dispose of the video stream. |
| 75 | Future<void> stop() { | 84 | Future<void> stop() { |
| 76 | throw UnimplementedError('stop() has not been implemented.'); | 85 | throw UnimplementedError('stop() has not been implemented.'); |
-
Please register or login to post a comment