freedelity / flutter_native_barcode_scanner

Fast barcode/QR scanner flutter plugin using PlatformView and processing on native side
https://pub.dev/packages/native_barcode_scanner
BSD 3-Clause "New" or "Revised" License
6 stars 8 forks source link

Does not render PlatformView immediately after giving permission to use the camera #15

Closed tmpfs closed 9 months ago

tmpfs commented 9 months ago

Hi,

Just migrated over to the this library from mobile_scanner to avoid using MLKit on iOS and for the most part it's working quite well (once permission is granted).

On iOS 16.3.1, Immediately after I give permission to use the camera (the first time I want to scan) the PlatformView does not render the camera, I don't see an error or anything in the logs.

Once permission is granted if I close the dialog (which renders the BarcodeScannerWidget widget) and open it again everything works fine and subsequently it works fine.

Any ideas why this might be happening?

Flutter 3.13.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ff5b5b5fa6 (5 months ago) • 2023-08-24 08:12:28 -0500
Engine • revision b20183e040
Tools • Dart 3.1.0 • DevTools 2.25.0
Verbruik commented 9 months ago

Hi ! Thx for the report ;-)

The last commit should fix this, can you test it and tell me if it's good for you ?

Thank you !

tmpfs commented 9 months ago

Indeed @Verbruik, I tested against the ios-authorization branch and it does fix the issue, thank you!

It would be great if you could merge that branch and publish a patch release - thanks 🙏