-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Padding does not work as expected #104
Comments
I changed the following code in qr_painter.dart line 389 and the bug seems solved
Seems roundToDouble caused this, it makes every single square has an int size W and for the entire image it causes the image size only allowed in certain sizes that is n times of W. Hope this will help. |
I am also facing this bug and I can confirm the change suggested fixes the problem. |
Yep, facing this bug here also. |
me too |
Is this bug still unresolved? |
Use this for now
|
Fixed in 5.0.0. |
@lukef It's still qr_flutter 4.0.0 long time gone and when publish 5.0.0? |
It seems that 5.0.0 is 91% done. Only 1 web ticket. You can find the progress here for 5.0.0 (https://github.com/theyakka/qr.flutter/milestone/3) @lukef do you have a timeline when we can expect this version? |
The 2nd qrCode and the 3rd one has different padding but share the 'same' size. I understand that they have different widget size and QrImage resized the image to the same. But this makes it impossible for me to get a qrCode with a size I wanted, it's always resized to some certain size. I think the image should always fit the size of the widget.
What's more, with zero padding, the qrCode overflows the boudary.
In my app this code caused overflow
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.17.1, on Microsoft Windows [Version 10.0.18362.959], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[!] Android Studio (version 3.2)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Ultimate Edition (version 2017.3)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code, 64-bit edition (version 1.41.0)
[√] Connected device (1 available
qr_flutter: ^3.0.1
The text was updated successfully, but these errors were encountered: