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

InputTooLongException for not mixed character

Open sedem7 opened this issue 6 years ago • 6 comments
trafficstars

I have the following code:

String barcode = '063994519708649896901260100447252359443123456781508151013320'; // length = 60
var qr = QrCode(2, QrErrorCorrectLevel.M)
  ..addData(barcode)
  ..make();

Specification are M for error level and version 2 (25x25).

If a try this code, the I get error: QrInputTooLongException: Input too long. 492 > 224.

It looks like that is trying to use Databits (mixed) for calculation. How can I specify that my barcode is always just digits, and that I want to use Numeric (not mixed) option, which allows 63 characters?

I should mention that current version that we use is Android with xzing library, where we don’t get such an error.

sedem7 avatar Jun 07 '19 09:06 sedem7

Same question~~

sionsxie avatar Jun 11 '19 03:06 sionsxie

Pull requests accepted!

kevmoo avatar Jun 12 '19 20:06 kevmoo

use different version. at least version 5,

QrImage( padding: EdgeInsets.all(0), version: 5, errorCorrectionLevel:QrErrorCorrectLevel.L, data: "https://etherscan.io/tx/0x9a9eab4bbff7aff754b2fbb14453ebf5f4d2809367ab6ec93e8b7579f41c144d", size: 100.0, )

nicktopcn avatar Jul 29 '19 07:07 nicktopcn

Pull requests accepted! @kevmoo

Where is the according PR?

use different version. at least version 5,

If you have a QR Code that requires Version 40 this is not an option.

DanielSoCra avatar Mar 02 '20 12:03 DanielSoCra

I don't think anyone has created a PR yet.

kevmoo avatar Mar 02 '20 16:03 kevmoo

This might help https://www.youtube.com/watch?v=9ADSWmPCJMg&list=PLQhQEGkwKZUqZC2QAp_u4ZAzqpsCCRvmM&index=6 https://www.youtube.com/watch?v=ZRUE1i15TYw&list=PLQhQEGkwKZUqZC2QAp_u4ZAzqpsCCRvmM&index=7

BraveEvidence avatar Mar 08 '23 07:03 BraveEvidence