Julian Steenbakker

bug: fixed return type analyzeImage

@@ -260,7 +260,9 @@ class MobileScannerController { @@ -260,7 +260,9 @@ class MobileScannerController {
260 /// 260 ///
261 /// [path] The path of the image on the devices 261 /// [path] The path of the image on the devices
262 Future<bool> analyzeImage(String path) async { 262 Future<bool> analyzeImage(String path) async {
263 - return methodChannel.invokeMethod('analyzeImage', path) as Future<bool>; 263 + return methodChannel
  264 + .invokeMethod<bool>('analyzeImage', path)
  265 + .then<bool>((bool? value) => value ?? false);
264 } 266 }
265 267
266 /// Disposes the MobileScannerController and closes all listeners. 268 /// Disposes the MobileScannerController and closes all listeners.