Skip to content

Commit

Permalink
fix: ean - now we display ean8 (and not just ean13) (openfoodfacts#2596)
Browse files Browse the repository at this point in the history
Impacted file:
* `edit_product_page.dart`
  • Loading branch information
monsieurtanuki authored Jul 14, 2022
1 parent 4314982 commit 390ea3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/smooth_app/lib/pages/product/edit_product_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ class _EditProductPageState extends State<EditProductPage> {
horizontal: screenSize.width / 4,
vertical: SMALL_SPACE,
),
barcode: Barcode.ean13(),
barcode: _product.barcode!.length == 8
? Barcode.ean8()
: Barcode.ean13(),
data: _product.barcode!,
errorBuilder: (final BuildContext context, String? _) =>
ListTile(
Expand Down

0 comments on commit 390ea3c

Please sign in to comment.