zxingReadBarcodesImageUrl function

Future<Codes> zxingReadBarcodesImageUrl(
  1. String url,
  2. DecodeParams params
)

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,
  );
}