add loading

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

@ -143,6 +143,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isLoading: true,
appBarTitle: TranslationBase.of(context).patientProfile, appBarTitle: TranslationBase.of(context).patientProfile,
isShowAppBar: false, isShowAppBar: false,
body: Column( body: Column(
@ -228,11 +229,14 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
top: 180, top: 180,
left: 20, left: 20,
right: 20, right: 20,
child: Row( child: Row(
children: [ children: [
Expanded(child: Container()), Expanded(child: Container()),
if (patient.episodeNo == 0) if (patient.episodeNo == 0)
AppButton( AppButton(
loading: model.state== ViewState.BusyLocal,
disabled: model.state== ViewState.BusyLocal,
title: title:
"${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
color: isFromLiveCare || isInpatient color: isFromLiveCare || isInpatient
@ -262,9 +266,12 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
), ),
if (patient.episodeNo != 0) if (patient.episodeNo != 0)
AppButton( AppButton(
loading: model.state== ViewState.BusyLocal,
disabled: model.state== ViewState.BusyLocal,
title: title:
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
color: (isInpatient) || isFromLiveCare color: ((isInpatient) || isFromLiveCare) && model.state!= ViewState.BusyLocal
? Colors.red.shade700 ? Colors.red.shade700
: patient.patientStatusType == 43 : patient.patientStatusType == 43
? Colors.red.shade700 ? Colors.red.shade700

Loading…
Cancel
Save