From 685b6dbb4aa719336e8a8b993f9838887de3463c Mon Sep 17 00:00:00 2001 From: yaso-meth Date: Thu, 1 Aug 2024 14:46:07 +0200 Subject: [PATCH] v=0.0.0.7 & move position of delete button & premove useless prints --- .../lib/components/BuildFileView.dart | 3 - .../lib/components/buildFilesList.dart | 56 ++++++++++--------- Frontend/patient_manager/web/index.html | 2 +- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/Frontend/patient_manager/lib/components/BuildFileView.dart b/Frontend/patient_manager/lib/components/BuildFileView.dart index f84e1974..85c346df 100644 --- a/Frontend/patient_manager/lib/components/BuildFileView.dart +++ b/Frontend/patient_manager/lib/components/BuildFileView.dart @@ -24,8 +24,6 @@ class _BuildFileViewState extends State { @override Widget build(BuildContext context) { - print( - "${widget.link} ================================================================"); if (getExtType(widget.path).toLowerCase() == "pdf") { //print(widget.pdfLink); return SizedBox( @@ -42,7 +40,6 @@ class _BuildFileViewState extends State { ), ); } else { - print("Image"); return InteractiveViewer( maxScale: 5.0, //minScale: 0., diff --git a/Frontend/patient_manager/lib/components/buildFilesList.dart b/Frontend/patient_manager/lib/components/buildFilesList.dart index 22bf9732..a650bbd0 100644 --- a/Frontend/patient_manager/lib/components/buildFilesList.dart +++ b/Frontend/patient_manager/lib/components/buildFilesList.dart @@ -174,33 +174,19 @@ class _BuildFilesListState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - fileName, - textAlign: TextAlign.center, - style: TextStyle( - color: MzanziInnovationHub.of(context)! - .theme - .secondaryColor(), - fontSize: 35.0, - fontWeight: FontWeight.bold, - ), - ), - IconButton( - onPressed: () { - deleteFilePopUp(filePath, fileID); - }, - icon: Icon( - Icons.delete, - color: MzanziInnovationHub.of(context)! - .theme - .secondaryColor(), - ), - ), - ], + const SizedBox( + height: 25, + ), + Text( + fileName, + textAlign: TextAlign.center, + style: TextStyle( + color: MzanziInnovationHub.of(context)! + .theme + .secondaryColor(), + fontSize: 35.0, + fontWeight: FontWeight.bold, + ), ), const SizedBox(height: 25.0), Expanded( @@ -246,6 +232,22 @@ class _BuildFilesListState extends State { ), ), ), + Positioned( + top: 5, + left: 5, + width: 50, + height: 50, + child: IconButton( + onPressed: () { + deleteFilePopUp(filePath, fileID); + }, + icon: Icon( + Icons.delete, + color: + MzanziInnovationHub.of(context)!.theme.secondaryColor(), + ), + ), + ), ], ), ), diff --git a/Frontend/patient_manager/web/index.html b/Frontend/patient_manager/web/index.html index 2f01b606..b3886ea0 100644 --- a/Frontend/patient_manager/web/index.html +++ b/Frontend/patient_manager/web/index.html @@ -68,7 +68,7 @@ - +