-
Notifications
You must be signed in to change notification settings - Fork 324
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
emptyColor #210
Comments
Sorry for respond late.
I see you're using the `QrPainter` class to generate QR codes in your
Flutter code. To replace the deprecated `emptyColor` attribute, you can use
the `color` attribute instead, which sets the color of the QR code itself.
If you want to make the QR code have a white background, you can set the
`color` attribute to white. Here's how you can update your code:
…On Sun, Sep 24, 2023 at 3:35 AM Jose Josemar de Carvalho < ***@***.***> wrote:
Hi theyakka, I'm using your lib to generate qrcode, I'm using the
QrPainter class to create the qrcode and getting the BufferByte to save it
to file.
I have the following problem, if I don't use emptyColor the saved image
has a black background.
*Code:*
[image: image]
<https://user-images.githubusercontent.com/5593817/270143097-dbee2d2e-4220-434f-9d76-c7c514df8909.png>
[image: image]
<https://user-images.githubusercontent.com/5593817/270142889-57e5564a-f625-4d03-9d75-87acaad8cea2.png>
*Code:*
[image: image]
<https://user-images.githubusercontent.com/5593817/270143019-0248ad50-e14a-427a-a9c6-e9c402818d8c.png>
[image: image]
<https://user-images.githubusercontent.com/5593817/270143147-ff1932e2-4c9e-4452-a21c-2a5a5999e10e.png>
however the emptyColor attribute is deprecated, what alternatives do I
have to replace the emptyColor attribute while maintaining the same result?
I am grateful in advance for your attention
—
Reply to this email directly, view it on GitHub
<#210>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVAU5BV3FAFFJSFTZO4SPS3X36TAJANCNFSM6AAAAAA5EUQRSU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I would also like to understand what is the alternative. The 'color' property is also deprecated, the suggestion in the code: The problem with this is that I am generating an Image and not a widget, I would like to have a white background on my png image, or a png without the alpha channel. How can I achieve this without |
I faced the same issue and I was going to open an issue here but found this one is already opened Mainly we use QR code to share some links. In a lot of scenarios, we need to share or save the QR code as an image. when user try to share qr code like in WhatsApp for example, the user will get blank black screen let me send the code that is Working:
This image will always show QR code with black pixels and tints with a white background (not a blank black Image) so I suggest getting |
Same issue |
Hi theyakka, I'm using your lib to generate qrcode, I'm using the QrPainter class to create the qrcode and getting the BufferByte to save it to file.
I have the following problem, if I don't use emptyColor the saved image has a black background.
Code:
Code:
however the emptyColor attribute is deprecated, what alternatives do I have to replace the emptyColor attribute while maintaining the same result?
I am grateful in advance for your attention
The text was updated successfully, but these errors were encountered: