zxingReadBarcode function
Code
zxingReadBarcode(
- Uint8List bytes, {
- required int width,
- required int height,
- DecodeParams? params,
Implementation
Code zxingReadBarcode(
Uint8List bytes, {
required int width,
required int height,
DecodeParams? params,
}) {
Code result = _readBarcode(bytes, width, height, params);
if (!result.isValid && params != null && params.tryInverted == true) {
// try to invert the image and read again
final Uint8List invertedBytes = invertImage(bytes);
result = _readBarcode(invertedBytes, width, height, params);
}
return result;
}