add loading

merge-requests/816/head
Elham Rababh 4 years ago
parent cc26053bc1
commit 4c2d55015f

@ -143,6 +143,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isLoading: true,
appBarTitle: TranslationBase.of(context).patientProfile,
isShowAppBar: false,
body: Column(
@ -233,6 +234,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
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<PatientProfileScreen>
),
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

Loading…
Cancel
Save