khoren93 / flutter_zxing

Flutter plugin for scanning and generating QR codes using the ZXing library, supporting Android, iOS, and desktop platforms
https://pub.dev/packages/flutter_zxing
MIT License
92 stars 52 forks source link

Get raw bytes when reading DataMatrix format #41

Open kaciula opened 1 year ago

kaciula commented 1 year ago

I am reading a DataMatrix file and I need the exact raw bytes because the data stored in the DataMatrix is data compressed with zip and any sort of encoding messes up some of the bytes and the data cannot be read. I would need a Uint8List with the raw bytes.

Can you help?

khoren93 commented 1 year ago

Hi @kaciula

I added an 'rawBytes' array in scan result. Please update to v0.8.4 and check if it works as you need.

Thanks.

kaciula commented 1 year ago

@khoren93 It works great! Thank you very much. Really appreciated.

kaciula commented 1 year ago

@khoren93 I've only now tested on iOS and the raw bytes are completely different than they should be.

On Android it works perfectly. And I'm using the same image to test for both platforms.

kaciula commented 1 year ago

Looking closer at the raw bytes, it seems the first 18 bytes are wrong on iOS and then the rest of the bytes are OK. Maybe it helps to track down the issue.

I'm also adding the DataMatrix image for testing purposes.

reteta2.pdf

Venkat-polagani7 commented 5 months ago

Hi @kaciula and @khoren93

I tried to read a barcode from iPhone but when the camera is scanning an error occurred "flutter: type 'ArgumentError' is not a subtype of type 'Code' in type cast". Even when uploading from gallery it is showing same error. Is there any fix. If so, kindly please do share.