DavBfr / dart_barcode

Barcode generation library
https://pub.dev/packages/barcode
Apache License 2.0
132 stars 41 forks source link

unable to encode CodaBar #17

Closed kw2019ltd closed 3 years ago

kw2019ltd commented 4 years ago

hi, my CodaBar is A123456789B this is rawValue , and when trying to build widget its failing ,

can you handle it to check if its already having start and end BarcodeCodabarStartStop.

1595599330350 screenshot_20200724-170456

kw2019ltd commented 4 years ago

example if i want to display something like this , it will not work as you dont expect for "data" to be "A23342453D" BarcodeWidget({ @required String data

image

kw2019ltd commented 4 years ago

getting many issue like below even barcode is valid

image

DavBfr commented 4 years ago

Actually, you can adapt your code to make it work: It's already possible to specify the Start and Stop values (A, B, C, or D)

You can create a function to convert your string "A123456789D" to:

BarcodeWidget(
            data: '123456789',
            width: 60,
            height: 60,
            barcode: Barcode.codabar(
                  start = BarcodeCodabarStartStop.A,
                  stop = BarcodeCodabarStartStop.D,
            ),
),
kw2019ltd commented 4 years ago

Hi, in my case data is A123456789B

So i need to remove start and end chars, and to specify start and end barcode Type. Can't this be done inside plugin?

Also in case iam doing a WA by removing start and end chars,

BarCodeWidget dose not display start and end, it only display number

On Sat, Jul 25, 2020, 18:41 David PHAM-VAN notifications@github.com wrote:

Actually, you can adapt your code to make it work: It's already possible to specify the Start and Stop values (A, B, C, or D)

You can create a function to convert your string "A123456789D" to:

BarcodeWidget( data: '123456789', width: 60, height: 60, barcode: Barcode.codabar( start = BarcodeCodabarStartStop.A, stop = BarcodeCodabarStartStop.D, ), ),

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DavBfr/dart_barcode/issues/17#issuecomment-663869223, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALJEI6XVHJYZMKVMZ67XPX3R5L4KLANCNFSM4PGYBPZA .

kw2019ltd commented 4 years ago

i did the WA but the BarcodeWidget dose not display the start and the end

1595750015850

DavBfr commented 4 years ago

I can add an option to display the start and stop chars. Would that work?

kw2019ltd commented 4 years ago

Hi yes it will be helpful

On Mon, Jul 27, 2020, 14:08 David PHAM-VAN notifications@github.com wrote:

I can add an option to display the start and stop chars. Would that work?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DavBfr/dart_barcode/issues/17#issuecomment-664331873, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALJEI6TXUMBDN3QWMDBMINDR5VN2XANCNFSM4PGYBPZA .

DavBfr commented 4 years ago

Actually, I'll add 2 switches:

For your use-case, you'll want both to be set to true.

kw2019ltd commented 4 years ago

Yes excellent.

On Mon, Jul 27, 2020, 17:09 David PHAM-VAN notifications@github.com wrote:

Actually, I'll add 2 switches:

  • printStartStop: Outputs the Start and Stop characters as text under the barcode
  • explicitStartStop: The caller must explicitly specify the Start and Stop characters as letters (ABCDETN*) in the data. In this case, start and stop settings are ignored

For your use-case, you'll want both to be set to true.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DavBfr/dart_barcode/issues/17#issuecomment-664419415, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALJEI6VUAZYXW2D6KKYIO7TR5WDC5ANCNFSM4PGYBPZA .

DavBfr commented 4 years ago

I just pushed the fix, can you test the master branch?

kw2019ltd commented 4 years ago

hi tested looks good

screenshot_20200728-120257

kw2019ltd commented 3 years ago

hi when you planing to release new version ?

DavBfr commented 3 years ago

There you go! Don't hesitate to Buy Me A Coffee.