Open IvanKastorsky opened 2 years ago
Did you managed to solve this??
Yes I did, but using another package
flutter_esc_pos_utils
I manage to solve this using image QR instead build in command qrcode
.
Combined with qr_flutter
I manage to solve this using image QR instead build in command
qrcode
.Combined with qr_flutter
hi, do u have any example of this method?
Hi @caini1213 , here you combine using library qr_flutter
, basically you input qr image into generator image
final double qrSize = paperSize == 58 ? 250 : 300;
try {
final uiImg = await QrPainter(
data: code,
version: QrVersions.auto,
gapless: false,
).toImageData(qrSize);
final dir = await getTemporaryDirectory();
final pathName = '${dir.path}/qr_tmp.png';
final qrFile = File(pathName);
if (uiImg != null) {
final imgFile = await qrFile.writeAsBytes(uiImg.buffer.asUint8List());
final image = img.decodeImage(imgFile.readAsBytesSync());
if (image != null) {
ticket += _generator.image(image);
}
}
} catch (_) {}
No matter how I change the QRSize it still the same when printed.
Am I doing something wrong?
Printer model: Milestone MHT-P29L https://www.milestoneiot.com/?thread-21-119.html