From 4c2d55015fa4811bddef384094bb1e9f8205360b Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 5 Sep 2021 15:10:22 +0300 Subject: [PATCH] add loading --- .../profile_screen/patient_profile_screen.dart | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart index 86f4a378..03046a8f 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -143,6 +143,7 @@ class _PatientProfileScreenState extends State }, builder: (_, model, w) => AppScaffold( baseViewModel: model, + isLoading: true, appBarTitle: TranslationBase.of(context).patientProfile, isShowAppBar: false, body: Column( @@ -228,11 +229,14 @@ class _PatientProfileScreenState extends State top: 180, left: 20, right: 20, - child: Row( + child: Row( children: [ Expanded(child: Container()), if (patient.episodeNo == 0) AppButton( + loading: model.state== ViewState.BusyLocal, + disabled: model.state== ViewState.BusyLocal, + title: "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", color: isFromLiveCare || isInpatient @@ -262,9 +266,12 @@ class _PatientProfileScreenState extends State ), if (patient.episodeNo != 0) AppButton( + loading: model.state== ViewState.BusyLocal, + disabled: model.state== ViewState.BusyLocal, + title: "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", - color: (isInpatient) || isFromLiveCare + color: ((isInpatient) || isFromLiveCare) && model.state!= ViewState.BusyLocal ? Colors.red.shade700 : patient.patientStatusType == 43 ? Colors.red.shade700