diff --git a/lib/barcode_item.dart b/lib/barcode_item.dart index 556305d..49426dd 100644 --- a/lib/barcode_item.dart +++ b/lib/barcode_item.dart @@ -13,40 +13,42 @@ class BarcodeItem { required this.type, }); - static List barcodes(BuildContext context){ + static List barcodes(Translations translations){ return [ BarcodeItem( - description: Translations.of(context).dsc1, + description: translations.dsc1, data: "5905499300707", type: Barcode.ean13()), BarcodeItem( - description: Translations.of(context).dsc2, + description: translations.dsc2, data: "5907632637572", type: Barcode.ean13()), BarcodeItem( - description: Translations.of(context).dsc3, + description: translations.dsc3, data: "5900497025454", type: Barcode.ean13()), BarcodeItem( - description: Translations.of(context).dsc4 ,data: "00000000", type: Barcode.ean8()), + description: translations.dsc4 , + data: "00000000", + type: Barcode.ean8()), BarcodeItem( - description: Translations.of(context).dsc5, + description: translations.dsc5, data: "8680861069075", type: Barcode.ean13()), BarcodeItem( - description: Translations.of(context).dsc6, + description: translations.dsc6, data: "5090000000006", type: Barcode.ean13()), BarcodeItem( - description: Translations.of(context).dsc7, + description: translations.dsc7, data: "20982515", type: Barcode.ean8()), BarcodeItem( - description: Translations.of(context).dsc8, + description: translations.dsc8, data: "5906395053018", type: Barcode.ean13()), BarcodeItem( - description: Translations.of(context).dsc9, + description: translations.dsc9, data: "9771644705002", type: Barcode.ean13()), ]; diff --git a/lib/barcodes_page.dart b/lib/barcodes_page.dart index bf66f3f..06f13fb 100644 --- a/lib/barcodes_page.dart +++ b/lib/barcodes_page.dart @@ -33,7 +33,7 @@ class BarcodesPageState extends State { } @override - Widget build(BuildContext context) { + Widget build(context) { return Scaffold( appBar: AppBar( title: Text(Translations.of(context).title1), diff --git a/lib/barcodes_panel.dart b/lib/barcodes_panel.dart index 9905811..5441404 100644 --- a/lib/barcodes_panel.dart +++ b/lib/barcodes_panel.dart @@ -102,14 +102,14 @@ class BarcodesPanelState extends State { }); }, ), - const SizedBox(height: Constants.errorHeight) + const SizedBox(height: Constants.errorHeight), ], ), ); } @override - Widget build(BuildContext context) { + Widget build( BuildContext context) { return Padding( padding: const EdgeInsets.all(8.0), child: Column( diff --git a/lib/main.dart b/lib/main.dart index 82f154c..9075223 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -16,7 +16,7 @@ class MyApp extends StatelessWidget { Widget build(BuildContext context) { return MaterialApp( title: (Translations.of(context).app_title), - home: BarcodesPage(barcodes: BarcodeItem.barcodes(context)), + home: BarcodesPage(barcodes: BarcodeItem.barcodes(Translations.of(context))), ); } }