I have implemented the qr code scanning feature in my Flutter app using https://pub.dev/packages/mobile_scanner plugin.
it’s working fine on Android 10 devices but I don’t know why the camera preview screen for scanning qr freezes on android 12 devices only.
final scanController = MobileScannerController(detectionSpeed: DetectionSpeed.normal,autoStart: true,facing: CameraFacing.front);
MobileScanner(controller: scanController, onDetect: (barcode) {
final String code = barcode.barcodes.first.rawValue ?? '';
if (code.isNotEmpty) {
scanController.stop();
}});
Since I am new to Flutter app development I cannot solve this camera freeze issue occurring only on Android 12 devices.
I have Lenovo Tab K10 having Android 12