juliuscanute / qr_code_scanner

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

[BUG] Camera cannot be resumed in IOS Device Only #563

Closed fikrihkll closed 1 year ago

fikrihkll commented 2 years ago

Describe the bug When the camera detect a QR Code, then the camera is paused to process the data. After there is callback from the process, then the camera need to be resumed again. There is no problem in Android, but the problem is in iOS device, the camera is freeze, camera can't be resumed, even though _controller.resumeCamera() is already called.

Flutter information Always provide the output of flutter doctor -v as it is needed in order to know on which Flutter versions the bug exists in. [✓] Flutter (Channel stable, 2.2.3, on macOS 12.4 21F79 darwin-arm, locale en-ID) [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) [✓] Xcode - develop for iOS and macOS [✓] Chrome - develop for the web [!] Android Studio (version 2021.2) ✗ Unable to find bundled Java version. [✓] IntelliJ IDEA Community Edition (version 2022.1.2) [✓] VS Code (version 1.68.1) [✓] Connected device (2 available)

Device (please complete the following information):

Screenshots _

Additional context Only in iOS device. Tested in iPhone 11.

Dabbit-Chan commented 1 year ago

add a delay(such as await Future.delayed(const Duration(milliseconds: 300));)before you resume camera

fikrihkll commented 1 year ago

add a delay(such as await Future.delayed(const Duration(milliseconds: 300));)before you resume camera

it works, thanks