Open edrianbiagi opened 1 year ago
Any news about this problem? This happens to me too! I can't read a qrcode sequentially
I found a solution that did the trick for me.
I initialize the scannerController
in Flutter's build
method of the corresponding stateful Widget class, and not directly within the class as you pobably would. The problem I had was that I wanted to toggle the camera, i.e. the scanner, on and of by pressing a camera button. And once I turned the camera on and of and on again with the button at least for one time, the scanner did not scan again.
As a result, I re-initialize and, thus I kind of reset the scanner every time the state of the stateful widget changes as I press the camera toggle button. At least that's how I interpret it. Anyway, it solves the issue of not being able of scanning sequentially.
Give it a try if you like!
I check if the qrcode was read correctly. If it returns status 400, it displays the error message. The camera is still enabled, but it is not possible to read a new qrcode.
I need to close the camera and open it again if I want to read a qrcode.