Merge pull request #15 from yaso-meth/loyalty-card-bardcode-view-update

Loyalty-card-bardcode-view-update
This commit is contained in:
yaso-meth
2024-11-27 19:02:47 +02:00
committed by GitHub
2 changed files with 39 additions and 25 deletions

View File

@@ -57,31 +57,45 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
shopName: widget.cardList[index].shop_name, height: 250), shopName: widget.cardList[index].shop_name, height: 250),
], ],
), ),
const SizedBox(height: 15), //const SizedBox(height: 10),
SizedBox( Container(
height: 150, width: 250,
width: 500, //color: Colors.white,
child: BarcodeWidget( decoration: BoxDecoration(
//color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), borderRadius: BorderRadius.circular(10),
barcode: Barcode.code128(), color: Colors.white,
backgroundColor: Colors.white,
data: widget.cardList[index].card_number,
drawText: false,
), ),
// SfBarcodeGenerator( child: Column(
// backgroundColor: Colors.white, children: [
// barColor: Colors.black, const SizedBox(height: 10),
// value: widget.cardList[index].card_number, SizedBox(
// symbology: Code128(), height: 50,
// //showValue: true, width: 200,
// ), child: BarcodeWidget(
), //color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
Text( barcode: Barcode.code128(),
"Card Number: ${widget.cardList[index].card_number}", backgroundColor: Colors.white,
style: TextStyle( data: widget.cardList[index].card_number,
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), drawText: false,
),
// SfBarcodeGenerator(
// backgroundColor: Colors.white,
// barColor: Colors.black,
// value: widget.cardList[index].card_number,
// symbology: Code128(),
// //showValue: true,
// ),
),
Text(
"Card Number: ${widget.cardList[index].card_number}",
style: TextStyle(
color: Colors.black,
//MzanziInnovationHub.of(context)!.theme.secondaryColor(),
),
),
],
), ),
), )
], ],
), ),
); );

View File

@@ -11,8 +11,8 @@ import 'package:Mzansi_Innovation_Hub/mih_objects/loyalty_card.dart';
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/builder/build_loyalty_card_list.dart'; import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/builder/build_loyalty_card_list.dart';
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/components/mih_card_display.dart'; import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/components/mih_card_display.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; // import 'package:flutter/services.dart';
import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart'; // import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart';
import 'package:mobile_scanner/mobile_scanner.dart'; import 'package:mobile_scanner/mobile_scanner.dart';
import 'package:simple_barcode_scanner/simple_barcode_scanner.dart'; import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';