fix overflow issue

This commit is contained in:
2025-03-10 13:05:57 +02:00
parent 6ba5bd18b4
commit 96c1604c55
3 changed files with 112 additions and 151 deletions

View File

@@ -17,100 +17,43 @@ class _MihCardDisplayState extends State<MihCardDisplay> {
Widget displayLoyaltyCard() {
switch (widget.shopName.toLowerCase()) {
case "best before":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/best_before.png'),
);
return Image.asset('images/loyalty_cards/best_before.png');
case "checkers":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/checkers.png'),
);
return Image.asset('images/loyalty_cards/checkers.png');
case "clicks":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/Clicks_Club.png'),
);
return Image.asset('images/loyalty_cards/Clicks_Club.png');
case "cotton:on":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/cotton_on_perks.png'),
);
return Image.asset('images/loyalty_cards/cotton_on_perks.png');
case "dis-chem":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/dischem_benefit.png'),
);
return Image.asset('images/loyalty_cards/dischem_benefit.png');
case "pick n pay":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/pnp_smart.png'),
);
return Image.asset('images/loyalty_cards/pnp_smart.png');
case "shoprite":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/shoprite.png'),
);
return Image.asset('images/loyalty_cards/shoprite.png');
case "spar":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/spar_rewards.png'),
);
return Image.asset('images/loyalty_cards/spar_rewards.png');
case "woolworths":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/wrewards.png'),
);
return Image.asset('images/loyalty_cards/wrewards.png');
case "makro":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/makro.png'),
);
return Image.asset('images/loyalty_cards/makro.png');
case "fresh stop":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/fresh_stop.png'),
);
return Image.asset('images/loyalty_cards/fresh_stop.png');
case "panarottis":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/panarottis.png'),
);
return Image.asset('images/loyalty_cards/panarottis.png');
case "shell":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/Shell.png'),
);
return Image.asset('images/loyalty_cards/Shell.png');
case "edgars":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/edgars.png'),
);
return Image.asset('images/loyalty_cards/edgars.png');
case "jet":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/jet.png'),
);
return Image.asset('images/loyalty_cards/jet.png');
case "spur":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/spur.png'),
);
return Image.asset('images/loyalty_cards/spur.png');
case "infinity":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/infinity.png'),
);
return Image.asset('images/loyalty_cards/infinity.png');
case "eskom":
return SizedBox(
height: widget.height,
child: Image.asset('images/loyalty_cards/eskom.png'),
);
return Image.asset('images/loyalty_cards/eskom.png');
default:
return SizedBox(
height: widget.height,
child: const Placeholder(),
);
return const Placeholder();
}
}