zxingReadBarcodesImageUrl function
Reads barcodes from image url
Returns Codes carrying an error instead of throwing when the image
cannot be fetched or decoded.
Implementation
Future<Codes> zxingReadBarcodesImageUrl(String url, DecodeParams params) async {
final _DecodedImage decoded = await _decodeImageUrl(url, params);
if (decoded.error != null) {
return _errorCodes(decoded.error!);
}
return _readBarcodes(
decoded.bytes!,
decoded.params!,
CodeSource.remoteImageFile,
);
}