Jochum van der Ploeg

fix: should check for the raw bytes instead of string, in case of a malformed utf8 string

... ... @@ -66,7 +66,7 @@ class _MobileScannerState extends State<MobileScanner>
}
}
String? lastScanned;
Uint8List? lastScanned;
@override
Widget build(BuildContext context) {
... ... @@ -79,8 +79,8 @@ class _MobileScannerState extends State<MobileScanner>
} else {
controller.barcodes.listen((barcode) {
if (!widget.allowDuplicates) {
if (lastScanned != barcode.rawValue) {
lastScanned = barcode.rawValue;
if (lastScanned != barcode.rawBytes) {
lastScanned = barcode.rawBytes;
widget.onDetect(barcode, value! as MobileScannerArguments);
}
} else {
... ...