Improve look of Card
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import 'package:Mzansi_Innovation_Hub/main.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class MihCardDisplay extends StatefulWidget {
|
class MihCardDisplay extends StatefulWidget {
|
||||||
@@ -18,236 +17,89 @@ class _MihCardDisplayState extends State<MihCardDisplay> {
|
|||||||
Widget displayLoyaltyCard() {
|
Widget displayLoyaltyCard() {
|
||||||
switch (widget.shopName.toLowerCase()) {
|
switch (widget.shopName.toLowerCase()) {
|
||||||
case "best before":
|
case "best before":
|
||||||
return Row(
|
return SizedBox(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
height: widget.height,
|
||||||
children: [
|
child: Image.asset('images/loyalty_cards/best_before.png'),
|
||||||
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(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
case "checkers":
|
case "checkers":
|
||||||
return Row(
|
return SizedBox(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
height: widget.height,
|
||||||
children: [
|
child: Image.asset('images/loyalty_cards/checkers.png'),
|
||||||
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(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
case "clicks":
|
case "clicks":
|
||||||
return Row(
|
return SizedBox(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
height: widget.height,
|
||||||
children: [
|
child: Image.asset('images/loyalty_cards/Clicks_Club.png'),
|
||||||
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(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
case "cotton:on":
|
case "cotton:on":
|
||||||
return Row(
|
return SizedBox(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
height: widget.height,
|
||||||
children: [
|
child: Image.asset('images/loyalty_cards/cotton_on_perks.png'),
|
||||||
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(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
case "dis-chem":
|
case "dis-chem":
|
||||||
return Row(
|
return SizedBox(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
height: widget.height,
|
||||||
children: [
|
child: Image.asset('images/loyalty_cards/dischem_benefit.png'),
|
||||||
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(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
case "pick n pay":
|
case "pick n pay":
|
||||||
return Row(
|
return SizedBox(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
height: widget.height,
|
||||||
children: [
|
child: Image.asset('images/loyalty_cards/pnp_smart.png'),
|
||||||
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(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
case "shoprite":
|
case "shoprite":
|
||||||
return Row(
|
return SizedBox(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
height: widget.height,
|
||||||
children: [
|
child: Image.asset('images/loyalty_cards/shoprite.png'),
|
||||||
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(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
case "spar":
|
case "spar":
|
||||||
return Row(
|
return SizedBox(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
height: widget.height,
|
||||||
children: [
|
child: Image.asset('images/loyalty_cards/spar_rewards.png'),
|
||||||
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(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
case "woolworths":
|
case "woolworths":
|
||||||
return Row(
|
return SizedBox(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
height: widget.height,
|
||||||
children: [
|
child: Image.asset('images/loyalty_cards/wrewards.png'),
|
||||||
Column(
|
);
|
||||||
children: [
|
case "makro":
|
||||||
SizedBox(
|
return SizedBox(
|
||||||
height: widget.height,
|
height: widget.height,
|
||||||
child: Image.asset('images/loyalty_cards/wrewards.png'),
|
child: Image.asset('images/loyalty_cards/makro.png'),
|
||||||
),
|
);
|
||||||
const SizedBox(height: 10),
|
case "fresh stop":
|
||||||
Text(
|
return SizedBox(
|
||||||
"WoolWorths",
|
height: widget.height,
|
||||||
textAlign: TextAlign.center,
|
child: Image.asset('images/loyalty_cards/fresh_stop.png'),
|
||||||
style: TextStyle(
|
);
|
||||||
fontSize: 20,
|
case "panarottis":
|
||||||
fontWeight: FontWeight.bold,
|
return SizedBox(
|
||||||
color:
|
height: widget.height,
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
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:
|
default:
|
||||||
return const SizedBox(
|
return SizedBox(
|
||||||
height: 150,
|
height: widget.height,
|
||||||
child: Placeholder(),
|
child: const Placeholder(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user