From 3538f2454ca70e746da6f3fc259fca4ead430709 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Tue, 10 Jun 2025 16:15:27 +0200 Subject: [PATCH] fix button alignment --- .../package_tools/patient_documents.dart | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/Frontend/lib/mih_packages/patient_profile/pat_profile/package_tools/patient_documents.dart b/Frontend/lib/mih_packages/patient_profile/pat_profile/package_tools/patient_documents.dart index ea894653..8bb3afc0 100644 --- a/Frontend/lib/mih_packages/patient_profile/pat_profile/package_tools/patient_documents.dart +++ b/Frontend/lib/mih_packages/patient_profile/pat_profile/package_tools/patient_documents.dart @@ -238,6 +238,7 @@ class _PatientDocumentsState extends State { ? EdgeInsets.symmetric(horizontal: width * 0.05) : const EdgeInsets.symmetric(horizontal: 0), child: Column( + mainAxisAlignment: MainAxisAlignment.center, children: [ MihForm( formKey: _formKey, @@ -298,27 +299,29 @@ class _PatientDocumentsState extends State { ], ), const SizedBox(height: 20), - MihButton( - onPressed: () { - if (_formKey.currentState!.validate()) { - submitDocUploadForm(); - // uploadSelectedFile(selected); - Navigator.pop(context); - } else { - MihAlertServices().formNotFilledCompletely(context); - } - }, - buttonColor: - MzanziInnovationHub.of(context)!.theme.successColor(), - width: 300, - child: Text( - "Add File", - style: TextStyle( - color: MzanziInnovationHub.of(context)! - .theme - .primaryColor(), - fontSize: 20, - fontWeight: FontWeight.bold, + Center( + child: MihButton( + onPressed: () { + if (_formKey.currentState!.validate()) { + submitDocUploadForm(); + // uploadSelectedFile(selected); + Navigator.pop(context); + } else { + MihAlertServices().formNotFilledCompletely(context); + } + }, + buttonColor: + MzanziInnovationHub.of(context)!.theme.successColor(), + width: 300, + child: Text( + "Add File", + style: TextStyle( + color: MzanziInnovationHub.of(context)! + .theme + .primaryColor(), + fontSize: 20, + fontWeight: FontWeight.bold, + ), ), ), ),