DavBfr / dart_barcode

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

Optional start and end characters [A,B,C,D] for Codabar causes failure to encode error. #23

Closed samir97 closed 3 years ago

samir97 commented 3 years ago

The widget works fine for numeric, and special characters data. However, Codabar can optionally have [A,B,C,D] as a start or end character which encoded, adding these causes a crash.

1234-$/+. works fine. A1234A throws an exception.

DavBfr commented 3 years ago

If you want to manually specify the start and stop characters, use:

Barcode.codabar(
      explicitStartStop: true,
);

or

Barcode.codabar(
        start: BarcodeCodabarStartStop.B,
        stop: BarcodeCodabarStartStop.D,
);
samir97 commented 3 years ago

If you want to manually specify the start and stop characters, use:

Barcode.codabar(
      explicitStartStop: true,
);

or

Barcode.codabar(
        start: BarcodeCodabarStartStop.B,
        stop: BarcodeCodabarStartStop.D,
);

Thank you, that fixed the issue.

DavBfr commented 3 years ago

Don't hesitate to Buy Me A Coffee.