qr.flutter icon indicating copy to clipboard operation
qr.flutter copied to clipboard

Export Image data of QR-Code

Open yummy-application opened this issue 1 year ago • 6 comments

Hi, I'd like to download a QR code to the device of the user. For this, I need the image data. Now my question: How to get a PNG image out of an QrImageView()?

yummy-application avatar Sep 24 '24 18:09 yummy-application

+1 I also need to download the generated image

noisemaker00 avatar Oct 09 '24 17:10 noisemaker00

you can find an example of how to get the image bytes in test/painter_test.dart

rxlabz avatar Oct 10 '24 11:10 rxlabz

An export to svg would be cool as well

vanlooverenkoen avatar Oct 14 '24 15:10 vanlooverenkoen

use Screenshot as Parent Widget

vishwam1158 avatar Jan 21 '25 09:01 vishwam1158

you can find an example of how to get the image bytes in test/painter_test.dart

It's a workable but not flexible option. With QrPainter.toImageData we can't customize paddings, background and more. QrCode always draws with transparent background.

We are left to implement our own painter or other export option.

Vorkytaka avatar Feb 27 '25 22:02 Vorkytaka

Also looking for out of the box export method. I think export its a must for this library !

MisaGu avatar Apr 14 '25 08:04 MisaGu