diff --git a/Frontend/images/loyalty_cards/Shell.png b/Frontend/images/loyalty_cards/Shell.png new file mode 100644 index 00000000..7f4b2f02 Binary files /dev/null and b/Frontend/images/loyalty_cards/Shell.png differ diff --git a/Frontend/images/loyalty_cards/bb_club.png b/Frontend/images/loyalty_cards/bb_club.png deleted file mode 100644 index ff7d03e0..00000000 Binary files a/Frontend/images/loyalty_cards/bb_club.png and /dev/null differ diff --git a/Frontend/images/loyalty_cards/best_before.png b/Frontend/images/loyalty_cards/best_before.png new file mode 100644 index 00000000..92951bf9 Binary files /dev/null and b/Frontend/images/loyalty_cards/best_before.png differ diff --git a/Frontend/images/loyalty_cards/checkers.png b/Frontend/images/loyalty_cards/checkers.png new file mode 100644 index 00000000..2e0fda82 Binary files /dev/null and b/Frontend/images/loyalty_cards/checkers.png differ diff --git a/Frontend/images/loyalty_cards/edgars.png b/Frontend/images/loyalty_cards/edgars.png new file mode 100644 index 00000000..7bf048cb Binary files /dev/null and b/Frontend/images/loyalty_cards/edgars.png differ diff --git a/Frontend/images/loyalty_cards/fresh_stop.png b/Frontend/images/loyalty_cards/fresh_stop.png new file mode 100644 index 00000000..acfd7d97 Binary files /dev/null and b/Frontend/images/loyalty_cards/fresh_stop.png differ diff --git a/Frontend/images/loyalty_cards/jet.png b/Frontend/images/loyalty_cards/jet.png new file mode 100644 index 00000000..01412cbc Binary files /dev/null and b/Frontend/images/loyalty_cards/jet.png differ diff --git a/Frontend/images/loyalty_cards/makro.png b/Frontend/images/loyalty_cards/makro.png new file mode 100644 index 00000000..0e42cb46 Binary files /dev/null and b/Frontend/images/loyalty_cards/makro.png differ diff --git a/Frontend/images/loyalty_cards/panarottis.png b/Frontend/images/loyalty_cards/panarottis.png new file mode 100644 index 00000000..79c5c0ca Binary files /dev/null and b/Frontend/images/loyalty_cards/panarottis.png differ diff --git a/Frontend/images/loyalty_cards/shoprite.png b/Frontend/images/loyalty_cards/shoprite.png new file mode 100644 index 00000000..a4c9fe27 Binary files /dev/null and b/Frontend/images/loyalty_cards/shoprite.png differ diff --git a/Frontend/images/loyalty_cards/spur.png b/Frontend/images/loyalty_cards/spur.png new file mode 100644 index 00000000..7bae5cc6 Binary files /dev/null and b/Frontend/images/loyalty_cards/spur.png differ diff --git a/Frontend/lib/mih_packages/mzansi_wallet/builder/build_loyalty_card_list.dart b/Frontend/lib/mih_packages/mzansi_wallet/builder/build_loyalty_card_list.dart index 57561a02..69725566 100644 --- a/Frontend/lib/mih_packages/mzansi_wallet/builder/build_loyalty_card_list.dart +++ b/Frontend/lib/mih_packages/mzansi_wallet/builder/build_loyalty_card_list.dart @@ -57,9 +57,9 @@ class _BuildLoyaltyCardListState extends State { shopName: widget.cardList[index].shop_name, height: 250), ], ), - //const SizedBox(height: 10), + const SizedBox(height: 20), Container( - width: 250, + width: 500, //color: Colors.white, decoration: BoxDecoration( borderRadius: BorderRadius.circular(10), @@ -69,8 +69,8 @@ class _BuildLoyaltyCardListState extends State { children: [ const SizedBox(height: 10), SizedBox( - height: 50, - width: 200, + height: 75, + width: 300, child: BarcodeWidget( //color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), barcode: Barcode.code128(), @@ -86,12 +86,15 @@ class _BuildLoyaltyCardListState extends State { // //showValue: true, // ), ), + const SizedBox(height: 10), Text( - "Card Number: ${widget.cardList[index].card_number}", - style: TextStyle( - color: Colors.black, - //MzanziInnovationHub.of(context)!.theme.secondaryColor(), - ), + widget.cardList[index].card_number, + style: const TextStyle( + color: Colors.black, + fontSize: 25, + fontWeight: FontWeight.bold + //MzanziInnovationHub.of(context)!.theme.secondaryColor(), + ), ), ], ), @@ -128,7 +131,8 @@ class _BuildLoyaltyCardListState extends State { // shrinkWrap: true, itemCount: widget.cardList.length, gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent( - //mainAxisSpacing: 15, + mainAxisSpacing: 0, + crossAxisSpacing: 10, maxCrossAxisExtent: 175, ), itemBuilder: (context, index) { diff --git a/Frontend/lib/mih_packages/mzansi_wallet/components/mih_card_display.dart b/Frontend/lib/mih_packages/mzansi_wallet/components/mih_card_display.dart index f2caa379..8c4327d7 100644 --- a/Frontend/lib/mih_packages/mzansi_wallet/components/mih_card_display.dart +++ b/Frontend/lib/mih_packages/mzansi_wallet/components/mih_card_display.dart @@ -1,4 +1,3 @@ -import 'package:Mzansi_Innovation_Hub/main.dart'; import 'package:flutter/material.dart'; class MihCardDisplay extends StatefulWidget { @@ -18,236 +17,89 @@ class _MihCardDisplayState extends State { Widget displayLoyaltyCard() { switch (widget.shopName.toLowerCase()) { case "best before": - return Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Column( - children: [ - SizedBox( - height: widget.height, - child: Image.asset('images/loyalty_cards/bb_club.png'), - ), - const SizedBox(height: 10), - Text( - "Best Before", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - ), - ), - ], - ), - ], + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/best_before.png'), ); case "checkers": - return Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Column( - children: [ - SizedBox( - height: widget.height, - child: Image.asset('images/loyalty_cards/checkers_xtra.png'), - ), - const SizedBox(height: 10), - Text( - "Checkers", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - ), - ), - ], - ), - ], + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/checkers.png'), ); case "clicks": - return Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Column( - children: [ - SizedBox( - height: widget.height, - child: Image.asset('images/loyalty_cards/Clicks_Club.png'), - ), - const SizedBox(height: 10), - Text( - "Clicks", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - ), - ), - ], - ), - ], + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/Clicks_Club.png'), ); case "cotton:on": - return Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Column( - children: [ - SizedBox( - height: widget.height, - child: - Image.asset('images/loyalty_cards/cotton_on_perks.png'), - ), - const SizedBox(height: 10), - Text( - "Cotton:On", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - ), - ), - ], - ), - ], + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/cotton_on_perks.png'), ); case "dis-chem": - return Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Column( - children: [ - SizedBox( - height: widget.height, - child: - Image.asset('images/loyalty_cards/dischem_benefit.png'), - ), - const SizedBox(height: 10), - Text( - "Dis-Chem", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - ), - ), - ], - ), - ], + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/dischem_benefit.png'), ); case "pick n pay": - return Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Column( - children: [ - SizedBox( - height: widget.height, - child: Image.asset('images/loyalty_cards/pnp_smart.png'), - ), - const SizedBox(height: 10), - Text( - "Pick 'n Pay", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - ), - ), - ], - ), - ], + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/pnp_smart.png'), ); case "shoprite": - return Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Column( - children: [ - SizedBox( - height: widget.height, - child: Image.asset('images/loyalty_cards/shoprite_xtra.png'), - ), - const SizedBox(height: 10), - Text( - "Shoprite", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - ), - ), - ], - ), - ], + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/shoprite.png'), ); case "spar": - return Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Column( - children: [ - SizedBox( - height: widget.height, - child: Image.asset('images/loyalty_cards/spar_rewards.png'), - ), - const SizedBox(height: 10), - Text( - "Spar", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - ), - ), - ], - ), - ], + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/spar_rewards.png'), ); case "woolworths": - return Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Column( - children: [ - SizedBox( - height: widget.height, - child: Image.asset('images/loyalty_cards/wrewards.png'), - ), - const SizedBox(height: 10), - Text( - "WoolWorths", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - ), - ), - ], - ), - ], + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/wrewards.png'), + ); + case "makro": + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/makro.png'), + ); + case "fresh stop": + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/fresh_stop.png'), + ); + case "panarottis": + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/panarottis.png'), + ); + case "shell": + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/Shell.png'), + ); + case "edgars": + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/edgars.png'), + ); + case "jet": + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/jet.png'), + ); + case "spur": + return SizedBox( + height: widget.height, + child: Image.asset('images/loyalty_cards/spur.png'), ); default: - return const SizedBox( - height: 150, - child: Placeholder(), + return SizedBox( + height: widget.height, + child: const Placeholder(), ); } } diff --git a/Frontend/lib/mih_packages/mzansi_wallet/loyalty_cards.dart b/Frontend/lib/mih_packages/mzansi_wallet/loyalty_cards.dart index 6d68f971..eb29c141 100644 --- a/Frontend/lib/mih_packages/mzansi_wallet/loyalty_cards.dart +++ b/Frontend/lib/mih_packages/mzansi_wallet/loyalty_cards.dart @@ -116,9 +116,16 @@ class _LoyaltyCardsState extends State { "Clicks", "Cotton:On", "Dis-Chem", + "Edgars", + "Fresh Stop", + "Jet", + "Makro", + "Panarottis", "Pick n Pay", + "Shell", "Shoprite", "Spar", + "Spur", "Woolworths" ], required: true,