Scanner reading a few times and stops reading, so I have to close the screen and open it again, when removing the controller.dispose() this problem stops happening, it keeps reading several times.
I'm using the mobile scanner to read a QrCode with the controller created as follows in my viewModel
Scanner reading a few times and stops reading, so I have to close the screen and open it again, when removing the controller.dispose() this problem stops happening, it keeps reading several times. I'm using the mobile scanner to read a QrCode with the controller created as follows in my viewModel
MobileScannerController scanController = MobileScannerController(formats: [BarcodeFormat.qrCode]);
don't use dispose
@override void dispose() { scanController.dispose(); super.dispose(); }
mobile_scanner: ^3.2.0
Flutter 3.10.1 • Tools • Dart 3.0.1 • DevTools 2.23.1