Skip to content

Commit

Permalink
fix typo in codebar constant
Browse files Browse the repository at this point in the history
  • Loading branch information
navaronbracke committed Oct 23, 2023
1 parent 320533e commit e4d084e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/src/enums/barcode_format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ enum BarcodeFormat {
code93(4),

/// Barcode format constant for Codabar.
codebar(8),
codabar(8),

/// Barcode format constant for Data Matrix.
dataMatrix(16),
Expand Down Expand Up @@ -45,6 +45,12 @@ enum BarcodeFormat {
/// Barcode format constant for AZTEC.
aztec(4096);

/// This constant represents the old value for [BarcodeFormat.codabar].
///
/// Prefer using the new [BarcodeFormat.codabar] constant,
/// as the `codebar` value will be removed in a future release.
static const BarcodeFormat codebar = codabar;

const BarcodeFormat(this.rawValue);

factory BarcodeFormat.fromRawValue(int value) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/web/zxing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ extension ZXingBarcodeFormat on BarcodeFormat {
switch (this) {
case BarcodeFormat.aztec:
return 0;
case BarcodeFormat.codebar:
case BarcodeFormat.codabar:
return 1;
case BarcodeFormat.code39:
return 2;
Expand Down

0 comments on commit e4d084e

Please sign in to comment.