Navaron Bracke

explicitly state that analyze image is not supported on the web

@@ -85,7 +85,7 @@ abstract class MobileScannerPlatform extends PlatformInterface { @@ -85,7 +85,7 @@ abstract class MobileScannerPlatform extends PlatformInterface {
85 /// 85 ///
86 /// Upon calling this method, the necessary camera permission will be requested. 86 /// Upon calling this method, the necessary camera permission will be requested.
87 /// 87 ///
88 - /// The given [cameraDirection] is used as the direction for the camera that needs to be set up. 88 + /// The given [StartOptions.cameraDirection] is used as the direction for the camera that needs to be set up.
89 Future<MobileScannerViewAttributes> start(StartOptions startOptions) { 89 Future<MobileScannerViewAttributes> start(StartOptions startOptions) {
90 throw UnimplementedError('start() has not been implemented.'); 90 throw UnimplementedError('start() has not been implemented.');
91 } 91 }
@@ -184,6 +184,11 @@ class MobileScannerWeb extends MobileScannerPlatform { @@ -184,6 +184,11 @@ class MobileScannerWeb extends MobileScannerPlatform {
184 } 184 }
185 185
186 @override 186 @override
  187 + Future<BarcodeCapture?> analyzeImage(String path) {
  188 + throw UnsupportedError('analyzeImage() is not supported on the web.');
  189 + }
  190 +
  191 + @override
187 Widget buildCameraView() { 192 Widget buildCameraView() {
188 if (!_barcodeReader.isScanning) { 193 if (!_barcodeReader.isScanning) {
189 return const SizedBox(); 194 return const SizedBox();