juliuscanute / qr_code_scanner

QR Code Scanner for Flutter
BSD 2-Clause "Simplified" License
999 stars 759 forks source link

[BUG] flash not working properly in IOS #615

Open sachinbpatil619 opened 1 year ago

sachinbpatil619 commented 1 year ago

flash not working properly in IOS

steps to reproduce the issue:

  1. before scanning turn on the flash.
  2. scan a barcode
  3. pause camera/qrscanner (i have added a delay of 2 sec after successful scan then resuming the camera)
  4. flash is turning off and when camera is paused and not turning on camera resume

the same steps I tried in android it is working fine

Code: void _onQRViewCreated(QRViewController controller) { this.controller = controller; controller.resumeCamera(); controller.scannedDataStream.listen((scanData) { Vibrate.vibrate(); this.controller!.pauseCamera(); Future.delayed(const Duration(seconds: 2), () { _saveBarcodeDataInDatabase(scanData.code); this.controller!.resumeCamera(); }); }); }