From cbf485890f7e1a936d9d745f74e21073d199eada Mon Sep 17 00:00:00 2001 From: yaso-meth Date: Wed, 31 Jul 2024 16:25:39 +0200 Subject: [PATCH] Delete file message added --- .../lib/components/mihDeleteMessage.dart | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/Frontend/patient_manager/lib/components/mihDeleteMessage.dart b/Frontend/patient_manager/lib/components/mihDeleteMessage.dart index 7fe3daa0..018157d1 100644 --- a/Frontend/patient_manager/lib/components/mihDeleteMessage.dart +++ b/Frontend/patient_manager/lib/components/mihDeleteMessage.dart @@ -105,6 +105,91 @@ class _MIHDeleteMessageState extends State { ); } + void setFileNote() { + messageTypes["File"] = Stack( + children: [ + Container( + padding: const EdgeInsets.all(10.0), + width: 500.0, + height: (height / 3) * 1.5, + 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.max, + children: [ + Icon( + Icons.warning_amber_rounded, + size: 100, + 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: 25.0, + fontWeight: FontWeight.bold, + ), + ), + const SizedBox(height: 15), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 25.0), + child: Text( + "This file will be deleted permanently. Are you certain you want to delete it?", + style: TextStyle( + color: MzanziInnovationHub.of(context)! + .theme + .secondaryColor(), + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ), + SizedBox( + width: 300, + height: 100, + child: MyButton( + 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) { return messageTypes[type]; } @@ -117,6 +202,8 @@ class _MIHDeleteMessageState extends State { height = size.height; }); setDeleteNote(); + setFileNote(); + //print(size); // setState(() { // width = size.width;