Platform exception when I open the QRView widget from the qr_code_scanner package
Assuming that this code should work fine as it is given in package example, anyways
You can go back to previous version of flutter
In the Flutter install directory execute
git checkout v1.2.2 (the version you wanted)
Now run
flutter doctor
Or You can just go from a version to another using the new commands
flutter downgrade
-> go to the previous
flutter upgrade
-> update to the new one
I had the same issue and fixed it by requesting camera permission before showing the QR scanner. I did this using the following library: https://pub.dev/packages/permission_handler/install
I solved it with a method returning camera permission status and requesting it once if missing:
Future<PermissionStatus> _getCameraPermission() async { var status = await Permission.camera.status; if (!status.isGranted) { final result = await Permission.camera.request(); return result; } else { return status; }}
Then I call the method before opening the widget as a dialog
PermissionStatus status = await _getCameraPermission();if (status.isGranted) { showDialog( context: context, builder: (context) => QrScanDialog(onResult: onResult), );}