getDataFromImage method

  1. @override
Future<DataInImage> getDataFromImage(
  1. String path
)
override

Implementation

@override
Future<DataInImage> getDataFromImage(String path) async {
  bool validPath = await File.fromUri(Uri(path: path)).exists();
  if(!validPath) throw Exception("Invalid Image Path");

  OcrData? ocr = await processImageFromPath(path);
  BarcodeData? barcode = await getBarcodesFromImage(path);
  return DataInImage(ocr, barcode);
}