pop up design alignment

This commit is contained in:
2024-07-03 15:58:16 +02:00
parent 8f0134a98f
commit b25583ddf3
4 changed files with 415 additions and 264 deletions

View File

@@ -149,102 +149,105 @@ class _EditPatientState extends State<EditPatient> {
);
}
Widget deletePatientPopUp() {
return Dialog(
child: Stack(
children: [
Container(
padding: const EdgeInsets.all(10.0),
width: 500.0,
height: 475.0,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(25.0),
border: Border.all(color: Colors.blueAccent, width: 5.0),
),
child: Column(
//mainAxisSize: MainAxisSize.max,
children: [
const Icon(
Icons.warning_amber_rounded,
size: 100,
color: Colors.blueAccent,
),
const SizedBox(height: 15),
const Text(
"Are you sure you want to delete this?",
textAlign: TextAlign.center,
style: TextStyle(
void deletePatientPopUp() {
showDialog(
context: context,
builder: (context) => Dialog(
child: Stack(
children: [
Container(
padding: const EdgeInsets.all(10.0),
width: 500.0,
height: 475.0,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(25.0),
border: Border.all(color: Colors.blueAccent, width: 5.0),
),
child: Column(
//mainAxisSize: MainAxisSize.max,
children: [
const Icon(
Icons.warning_amber_rounded,
size: 100,
color: Colors.blueAccent,
fontSize: 25.0,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 10),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 25.0),
child: Text(
"This action is permanent! Deleting ${fnameController.text} ${lnameController.text} will remove him\\her from your account. You won't be able to recover it once it's gone.",
style: const TextStyle(
color: Colors.black,
fontSize: 15.0,
fontWeight: FontWeight.bold,
),
),
),
const SizedBox(height: 15),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 25.0),
child: Text(
"Here's what you'll be deleting:",
const SizedBox(height: 15),
const Text(
"Are you sure you want to delete this?",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontSize: 20.0,
color: Colors.blueAccent,
fontSize: 25.0,
fontWeight: FontWeight.bold,
),
),
),
const SizedBox(height: 10),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 25.0),
child: SizedBox(
width: 450,
const SizedBox(height: 10),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 25.0),
child: Text(
"1) Patient Profile Information.\n2) Patient Notes\n3) Patient Files.",
textAlign: TextAlign.left,
style: TextStyle(
"This action is permanent! Deleting ${fnameController.text} ${lnameController.text} will remove him\\her from your account. You won't be able to recover it once it's gone.",
style: const TextStyle(
color: Colors.black,
fontSize: 15.0,
fontWeight: FontWeight.bold,
),
),
),
),
SizedBox(
width: 300,
height: 100,
child: MyButton(
onTap: deletePatientApiCall, buttonText: "Delete"))
],
),
),
Positioned(
top: 5,
right: 5,
width: 50,
height: 50,
child: IconButton(
onPressed: () {
Navigator.pop(context);
},
icon: const Icon(
Icons.close,
color: Colors.red,
size: 35,
const SizedBox(height: 15),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 25.0),
child: Text(
"Here's what you'll be deleting:",
style: TextStyle(
color: Colors.black,
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
),
const SizedBox(height: 10),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 25.0),
child: SizedBox(
width: 450,
child: Text(
"1) Patient Profile Information.\n2) Patient Notes\n3) Patient Files.",
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
fontWeight: FontWeight.bold,
),
),
),
),
SizedBox(
width: 300,
height: 100,
child: MyButton(
onTap: deletePatientApiCall, buttonText: "Delete"))
],
),
),
),
],
Positioned(
top: 5,
right: 5,
width: 50,
height: 50,
child: IconButton(
onPressed: () {
Navigator.pop(context);
},
icon: const Icon(
Icons.close,
color: Colors.red,
size: 35,
),
),
),
],
),
),
);
}
@@ -315,10 +318,7 @@ class _EditPatientState extends State<EditPatient> {
icon: const Icon(Icons.delete),
alignment: Alignment.topRight,
onPressed: () {
showDialog(
context: context,
builder: (context) => deletePatientPopUp(),
);
deletePatientPopUp();
},
)
],