Julian Steenbakker
Committed by GitHub

Merge pull request #152 from juliansteenbakker/return-type

bug: fixed return type of analyzeImage
... ... @@ -260,7 +260,9 @@ class MobileScannerController {
///
/// [path] The path of the image on the devices
Future<bool> analyzeImage(String path) async {
return methodChannel.invokeMethod('analyzeImage', path) as bool;
return methodChannel
.invokeMethod<bool>('analyzeImage', path)
.then<bool>((bool? value) => value ?? false);
}
/// Disposes the MobileScannerController and closes all listeners.
... ...