khoren93 / flutter_zxing

Flutter plugin for scanning and generating QR codes using the ZXing library, supporting Android, iOS, and desktop platforms
https://pub.dev/packages/flutter_zxing
MIT License
89 stars 50 forks source link

Scanner overlay with relative sizes #58

Closed giuliatesta closed 1 year ago

giuliatesta commented 1 year ago

I added the possibility to create a ScannerOverlay, without the cut out size, to make it adaptive. I have created an abstract ScannerOverlay and two implementations: one with fixed sizes (I have maintained your original implementation) and one in which sizes depend on the camera around the overlay. You can use the cutOutSize parameter to indicate how big the cutout is as compared to the camera, using a value between 0 and 1, representing the percentage.

I hope that it can be helpful

khoren93 commented 1 year ago

Hi @giuliatesta

Thank you for your contribution! I really appreciate the time and effort you put into this pull request. Your changes have been merged and will be included in the next release.

Thanks again for your help and for making this project better.

Best regards, Khoren