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
88 stars 50 forks source link

ReaderWidget: cropPercent inverted / crop indicator #151

Open frankmer opened 1 week ago

frankmer commented 1 week ago

As the title says, cropPercent seems to be inverted. When I set cropPercent to 0.99, the QR code is detected when it fills the entire screen. 0.7 is the right amount to fit the indicator perfectly. 0.5 (the default) is too small. and if i set it smaller, then the qr has to be smaller on the screen. But I understand cropPercent as how much is cropped, not how much is left after cropping.

And because it affects the same variable: As I said, 0.5 (the default) is too small. Please set the default to 0.7 (when not changing cropPercent inversion) or 0.3 (when changing cropPercent inversion).

Bonus: It would be verry nice if the indicator is automatically (or only when a new bool variable for it is set to true) ajustest by the cropPercent so it will always match. Otherwise it will confuse the user if the QR has to be smaller than the indicator to scan the QR code.

Update: The default is just too small on my iPhone, on my Android device it is perfect. But if I set it to 0.7, the indicator is too small on the Android. But still better than the indicator being too big. This makes it even more important to make the indicator match the actual crop.