Skip to content
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

unable to encode CodaBar #17

Closed
kw2019ltd opened this issue Jul 24, 2020 · 13 comments
Closed

unable to encode CodaBar #17

kw2019ltd opened this issue Jul 24, 2020 · 13 comments

Comments

@kw2019ltd
Copy link

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
Copy link
Author

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
Copy link
Author

getting many issue like below even barcode is valid

image

@DavBfr
Copy link
Owner

DavBfr commented Jul 25, 2020

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
Copy link
Author

kw2019ltd commented Jul 25, 2020 via email

@kw2019ltd
Copy link
Author

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

1595750015850

@DavBfr
Copy link
Owner

DavBfr commented Jul 27, 2020

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

@kw2019ltd
Copy link
Author

kw2019ltd commented Jul 27, 2020 via email

@DavBfr
Copy link
Owner

DavBfr commented Jul 27, 2020

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.

@kw2019ltd
Copy link
Author

kw2019ltd commented Jul 27, 2020 via email

@DavBfr
Copy link
Owner

DavBfr commented Jul 27, 2020

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

@kw2019ltd
Copy link
Author

hi tested looks good

screenshot_20200728-120257

@kw2019ltd
Copy link
Author

hi when you planing to release new version ?

@DavBfr
Copy link
Owner

DavBfr commented Jul 29, 2020

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

@DavBfr DavBfr closed this as completed Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants