add delete confirmation pop up
This commit is contained in:
@@ -379,6 +379,88 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setDeleteLoyaltyCard() {
|
||||||
|
messageTypes["Loyalty Card"] = Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(popUpPaddingSize),
|
||||||
|
width: popUpWidth,
|
||||||
|
height: popUpheight,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
|
border: Border.all(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
width: 5.0),
|
||||||
|
),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Icons.warning_amber_rounded,
|
||||||
|
size: popUpIconSize,
|
||||||
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
//const SizedBox(height: 15),
|
||||||
|
Text(
|
||||||
|
"Are you sure you want to delete this?",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
fontSize: popUpTitleSize,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 15),
|
||||||
|
Text(
|
||||||
|
"This Card will be deleted permanently from your Mzansi Wallet. Are you certain you want to delete it?",
|
||||||
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
fontSize: popUpBodySize,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 15),
|
||||||
|
SizedBox(
|
||||||
|
width: 300,
|
||||||
|
height: 50,
|
||||||
|
child: MIHButton(
|
||||||
|
onTap: widget.onTap,
|
||||||
|
buttonText: "Delete",
|
||||||
|
buttonColor: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
textColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 5,
|
||||||
|
right: 5,
|
||||||
|
width: 50,
|
||||||
|
height: 50,
|
||||||
|
child: IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
icon: Icon(
|
||||||
|
Icons.close,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
|
size: 35,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget? getDeleteMessage(String type) {
|
Widget? getDeleteMessage(String type) {
|
||||||
return messageTypes[type];
|
return messageTypes[type];
|
||||||
}
|
}
|
||||||
@@ -400,6 +482,7 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
|
|||||||
setFileNote();
|
setFileNote();
|
||||||
setDeleteEmployee();
|
setDeleteEmployee();
|
||||||
setDeleteAppointment();
|
setDeleteAppointment();
|
||||||
|
setDeleteLoyaltyCard();
|
||||||
//print(size);
|
//print(size);
|
||||||
// setState(() {
|
// setState(() {
|
||||||
// width = size.width;
|
// width = size.width;
|
||||||
|
|||||||
Reference in New Issue
Block a user