Flutter - get data from embedded barcode scanner

53 Views Asked by At

I need to use an Athesi AP5705S device with an integrated barcode reader to scan barcodes. In my Flutter app, I'm unable to read the scanned barcodes, whereas in other apps (such as Notes, Chrome, etc.), scanned barcodes are correctly inserted.

I've noticed another strange thing. If I click on a TextField (focus on the field and the keyboard appears) to write and then scan the code, I don't receive any response. However, if I click on it, exit the app, and then re-enter, the TextField is still selected, and I can write correctly.

I tried RawKeyboardListener, nothing gets intercepted. But if I set the device to add a TAB or ENTER Key at the end of the barcodes these additional keys get intercepted. Any suffix or prefix to the barcode is not intercepted.

Any suggestions?

1

There are 1 best solutions below

2
debug86 On

What version of Flutter are you using? I would recommend you to try the latest stable version (3.19.3 at the moment).

You might want to use fvm to manage muliple Flutter installations on the same machine.