Skip to content

Commit

Permalink
review fixes/13
Browse files Browse the repository at this point in the history
  • Loading branch information
karolgeneral committed Jul 17, 2024
1 parent bd5e499 commit aa48e04
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
22 changes: 12 additions & 10 deletions lib/barcode_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,42 @@ class BarcodeItem {
required this.type,
});

static List<BarcodeItem> barcodes(BuildContext context){
static List<BarcodeItem> 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()),
];
Expand Down
2 changes: 1 addition & 1 deletion lib/barcodes_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class BarcodesPageState extends State<BarcodesPage> {
}

@override
Widget build(BuildContext context) {
Widget build(context) {
return Scaffold(
appBar: AppBar(
title: Text(Translations.of(context).title1),
Expand Down
4 changes: 2 additions & 2 deletions lib/barcodes_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ class BarcodesPanelState extends State<BarcodesPanel> {
});
},
),
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(
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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))),
);
}
}

0 comments on commit aa48e04

Please sign in to comment.