analyzeImage method

Future<bool> analyzeImage(
  1. String path
)

Handles a local image file. Returns true if a barcode or QR code is found. Returns false if nothing is found.

path The path of the image on the devices

Implementation

Future<bool> analyzeImage(String path) async {
  events ??= _eventChannel
      .receiveBroadcastStream()
      .listen((data) => _handleEvent(data as Map));

  return _methodChannel
      .invokeMethod<bool>('analyzeImage', path)
      .then<bool>((bool? value) => value ?? false);
}