Showing
3 changed files
with
10 additions
and
4 deletions
| @@ -16,7 +16,7 @@ enum BarcodeFormat { | @@ -16,7 +16,7 @@ enum BarcodeFormat { | ||
| 16 | code93(4), | 16 | code93(4), |
| 17 | 17 | ||
| 18 | /// Barcode format constant for Codabar. | 18 | /// Barcode format constant for Codabar. |
| 19 | - codebar(8), | 19 | + codabar(8), |
| 20 | 20 | ||
| 21 | /// Barcode format constant for Data Matrix. | 21 | /// Barcode format constant for Data Matrix. |
| 22 | dataMatrix(16), | 22 | dataMatrix(16), |
| @@ -45,6 +45,12 @@ enum BarcodeFormat { | @@ -45,6 +45,12 @@ enum BarcodeFormat { | ||
| 45 | /// Barcode format constant for AZTEC. | 45 | /// Barcode format constant for AZTEC. |
| 46 | aztec(4096); | 46 | aztec(4096); |
| 47 | 47 | ||
| 48 | + /// This constant represents the old value for [BarcodeFormat.codabar]. | ||
| 49 | + /// | ||
| 50 | + /// Prefer using the new [BarcodeFormat.codabar] constant, | ||
| 51 | + /// as the `codebar` value will be removed in a future release. | ||
| 52 | + static const BarcodeFormat codebar = codabar; | ||
| 53 | + | ||
| 48 | const BarcodeFormat(this.rawValue); | 54 | const BarcodeFormat(this.rawValue); |
| 49 | 55 | ||
| 50 | factory BarcodeFormat.fromRawValue(int value) { | 56 | factory BarcodeFormat.fromRawValue(int value) { |
| @@ -107,7 +107,7 @@ extension ZXingBarcodeFormat on BarcodeFormat { | @@ -107,7 +107,7 @@ extension ZXingBarcodeFormat on BarcodeFormat { | ||
| 107 | switch (this) { | 107 | switch (this) { |
| 108 | case BarcodeFormat.aztec: | 108 | case BarcodeFormat.aztec: |
| 109 | return 0; | 109 | return 0; |
| 110 | - case BarcodeFormat.codebar: | 110 | + case BarcodeFormat.codabar: |
| 111 | return 1; | 111 | return 1; |
| 112 | case BarcodeFormat.code39: | 112 | case BarcodeFormat.code39: |
| 113 | return 2; | 113 | return 2; |
| @@ -10,7 +10,7 @@ void main() { | @@ -10,7 +10,7 @@ void main() { | ||
| 10 | 1: BarcodeFormat.code128, | 10 | 1: BarcodeFormat.code128, |
| 11 | 2: BarcodeFormat.code39, | 11 | 2: BarcodeFormat.code39, |
| 12 | 4: BarcodeFormat.code93, | 12 | 4: BarcodeFormat.code93, |
| 13 | - 8: BarcodeFormat.codebar, | 13 | + 8: BarcodeFormat.codabar, |
| 14 | 16: BarcodeFormat.dataMatrix, | 14 | 16: BarcodeFormat.dataMatrix, |
| 15 | 32: BarcodeFormat.ean13, | 15 | 32: BarcodeFormat.ean13, |
| 16 | 64: BarcodeFormat.ean8, | 16 | 64: BarcodeFormat.ean8, |
| @@ -44,7 +44,7 @@ void main() { | @@ -44,7 +44,7 @@ void main() { | ||
| 44 | BarcodeFormat.code128: 1, | 44 | BarcodeFormat.code128: 1, |
| 45 | BarcodeFormat.code39: 2, | 45 | BarcodeFormat.code39: 2, |
| 46 | BarcodeFormat.code93: 4, | 46 | BarcodeFormat.code93: 4, |
| 47 | - BarcodeFormat.codebar: 8, | 47 | + BarcodeFormat.codabar: 8, |
| 48 | BarcodeFormat.dataMatrix: 16, | 48 | BarcodeFormat.dataMatrix: 16, |
| 49 | BarcodeFormat.ean13: 32, | 49 | BarcodeFormat.ean13: 32, |
| 50 | BarcodeFormat.ean8: 64, | 50 | BarcodeFormat.ean8: 64, |
-
Please register or login to post a comment