zxingReadBarcodes function
List<Code>
zxingReadBarcodes(
- Uint8List bytes, {
- required int width,
- required int height,
- DecodeParams? params,
Reads barcodes from Uint8List image bytes
Implementation
List<Code> zxingReadBarcodes(
Uint8List bytes, {
required int width,
required int height,
DecodeParams? params,
}) {
List<Code> results = _readBarcodes(bytes, width, height, params);
if (results.isEmpty && params != null && params.tryInverted == true) {
// try to invert the image and read again
final Uint8List invertedBytes = invertImage(bytes);
results = _readBarcodes(invertedBytes, width, height, params);
}
return results;
}