zxingReadBarcodeImageUrl function
Reads barcode from image url
Returns a Code carrying an error instead of throwing when the image
cannot be fetched or decoded.
Implementation
Future<Code> zxingReadBarcodeImageUrl(String url, DecodeParams params) async {
final _DecodedImage decoded = await _decodeImageUrl(url, params);
if (decoded.error != null) {
return Code(error: decoded.error, source: CodeSource.remoteImageFile);
}
return _readBarcode(
decoded.bytes!,
decoded.params!,
CodeSource.remoteImageFile,
);
}