mobile_scanner icon indicating copy to clipboard operation
mobile_scanner copied to clipboard

Multiple values for code39 barcode

Open PhenixZeller opened this issue 5 months ago • 3 comments

I get multiple values when I scan a code39 type of barcode.

Flutter version: 3.19.0 Package version: 3.5.7

Example: Screenshot 2024-03-05 at 07 55 04

Output onDetect:

onDetect: (capture) {
  for (final bc in capture.barcodes) {
    print('${bc.rawValue} || ${bc.displayValue} (format = ${bc.format}, type = ${bc.type})');
  }

// Returns
/*
20472E8
20472O
20472148
20472142 // Should be the only result
20472842
2047HE8
20472E
204724 
*/

Where do the values come from?

PhenixZeller avatar Mar 05 '24 06:03 PhenixZeller

Well, that depends on how MLKit detects the barcode. There isn't much we can do here.

navaronbracke avatar Mar 05 '24 09:03 navaronbracke