From 412e0e8f59a5103640f3b00507a165da3057919e Mon Sep 17 00:00:00 2001 From: yaso Date: Mon, 30 Sep 2024 15:19:09 +0200 Subject: [PATCH] Update actiopn button --- .../lib/mih_components/mih_layout/mih_action.dart | 8 +++----- .../lib/mih_packages/about_mih/mih_about.dart | 2 +- .../mih_packages/access_review/patient_access_review.dart | 2 +- .../manage_business/manage_business_profile.dart | 2 +- .../manage_business/profile_business_add.dart | 2 +- .../mih_packages/mzansi_profile/profile_user_update.dart | 2 +- .../lib/mih_packages/patient_profile/patient_add.dart | 2 +- .../lib/mih_packages/patient_profile/patient_edit.dart | 2 +- .../lib/mih_packages/patient_profile/patient_manager.dart | 2 +- .../lib/mih_packages/patient_profile/patient_view.dart | 2 +- 10 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Frontend/patient_manager/lib/mih_components/mih_layout/mih_action.dart b/Frontend/patient_manager/lib/mih_components/mih_layout/mih_action.dart index 4bfc0d3e..c75d0eaa 100644 --- a/Frontend/patient_manager/lib/mih_components/mih_layout/mih_action.dart +++ b/Frontend/patient_manager/lib/mih_components/mih_layout/mih_action.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; class MIHAction extends StatefulWidget { final void Function()? onTap; final double iconSize; - final IconData icon; + final Widget icon; const MIHAction({ super.key, required this.icon, @@ -35,12 +35,10 @@ class _MIHActionState extends State { height: 50, child: Builder( builder: (context) => IconButton( + iconSize: widget.iconSize, padding: const EdgeInsets.all(0), onPressed: widget.onTap, - icon: Icon( - widget.icon, - size: widget.iconSize, - ), + icon: widget.icon, ), ), ); diff --git a/Frontend/patient_manager/lib/mih_packages/about_mih/mih_about.dart b/Frontend/patient_manager/lib/mih_packages/about_mih/mih_about.dart index e51d6be2..b24817c0 100644 --- a/Frontend/patient_manager/lib/mih_packages/about_mih/mih_about.dart +++ b/Frontend/patient_manager/lib/mih_packages/about_mih/mih_about.dart @@ -21,7 +21,7 @@ class MIHAbout extends StatefulWidget { class _MIHAboutState extends State { MIHAction getActionButton() { return MIHAction( - icon: Icons.arrow_back, + icon: const Icon(Icons.arrow_back), iconSize: 35, onTap: () { Navigator.of(context).pushNamedAndRemoveUntil('/', (route) => false); diff --git a/Frontend/patient_manager/lib/mih_packages/access_review/patient_access_review.dart b/Frontend/patient_manager/lib/mih_packages/access_review/patient_access_review.dart index 86fab650..15d32978 100644 --- a/Frontend/patient_manager/lib/mih_packages/access_review/patient_access_review.dart +++ b/Frontend/patient_manager/lib/mih_packages/access_review/patient_access_review.dart @@ -218,7 +218,7 @@ class _PatientAccessRequestState extends State { MIHAction getActionButton() { return MIHAction( - icon: Icons.arrow_back, + icon: const Icon(Icons.arrow_back), iconSize: 35, onTap: () { Navigator.of(context).pop(); diff --git a/Frontend/patient_manager/lib/mih_packages/manage_business/manage_business_profile.dart b/Frontend/patient_manager/lib/mih_packages/manage_business/manage_business_profile.dart index 168a34d1..7c010453 100644 --- a/Frontend/patient_manager/lib/mih_packages/manage_business/manage_business_profile.dart +++ b/Frontend/patient_manager/lib/mih_packages/manage_business/manage_business_profile.dart @@ -284,7 +284,7 @@ class _ManageBusinessProfileState extends State { MIHAction getActionButton() { return MIHAction( - icon: Icons.arrow_back, + icon: const Icon(Icons.arrow_back), iconSize: 35, onTap: () { Navigator.of(context).pop(); diff --git a/Frontend/patient_manager/lib/mih_packages/manage_business/profile_business_add.dart b/Frontend/patient_manager/lib/mih_packages/manage_business/profile_business_add.dart index 4e027b44..13220df5 100644 --- a/Frontend/patient_manager/lib/mih_packages/manage_business/profile_business_add.dart +++ b/Frontend/patient_manager/lib/mih_packages/manage_business/profile_business_add.dart @@ -203,7 +203,7 @@ class _ProfileBusinessAddState extends State { MIHAction getActionButton() { return MIHAction( - icon: Icons.arrow_back, + icon: const Icon(Icons.arrow_back), iconSize: 35, onTap: () { Navigator.of(context).pop(); diff --git a/Frontend/patient_manager/lib/mih_packages/mzansi_profile/profile_user_update.dart b/Frontend/patient_manager/lib/mih_packages/mzansi_profile/profile_user_update.dart index 1b46aff3..77465453 100644 --- a/Frontend/patient_manager/lib/mih_packages/mzansi_profile/profile_user_update.dart +++ b/Frontend/patient_manager/lib/mih_packages/mzansi_profile/profile_user_update.dart @@ -286,7 +286,7 @@ class _ProfileUserUpdateState extends State { MIHAction getActionButton() { return MIHAction( - icon: Icons.arrow_back, + icon: const Icon(Icons.arrow_back), iconSize: 35, onTap: () { Navigator.of(context).pop(); diff --git a/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_add.dart b/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_add.dart index efa68751..1eb39867 100644 --- a/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_add.dart +++ b/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_add.dart @@ -318,7 +318,7 @@ class _AddPatientState extends State { MIHAction getActionButton() { return MIHAction( - icon: Icons.arrow_back, + icon: const Icon(Icons.arrow_back), iconSize: 35, onTap: () { Navigator.of(context).pop(); diff --git a/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_edit.dart b/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_edit.dart index a8408caf..b09624c1 100644 --- a/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_edit.dart +++ b/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_edit.dart @@ -556,7 +556,7 @@ class _EditPatientState extends State { MIHAction getActionButton() { return MIHAction( - icon: Icons.arrow_back, + icon: const Icon(Icons.arrow_back), iconSize: 35, onTap: () { Navigator.of(context).pop(); diff --git a/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_manager.dart b/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_manager.dart index ca243a43..fd882cae 100644 --- a/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_manager.dart +++ b/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_manager.dart @@ -344,7 +344,7 @@ class _PatientManagerState extends State { MIHAction getActionButton() { return MIHAction( - icon: Icons.arrow_back, + icon: const Icon(Icons.arrow_back), iconSize: 35, onTap: () { Navigator.of(context).pop(); diff --git a/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_view.dart b/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_view.dart index 888bd031..33b15851 100644 --- a/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_view.dart +++ b/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_view.dart @@ -106,7 +106,7 @@ class _PatientViewState extends State { MIHAction getActionButton() { return MIHAction( - icon: Icons.arrow_back, + icon: const Icon(Icons.arrow_back), iconSize: 35, onTap: () { Navigator.of(context).pop();