From 7d550ca15fd7c53b298ede6c6d7110d95627ac98 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 3 Jan 2021 00:32:59 +0200 Subject: [PATCH 1/2] prevent null --- .../soap_update/subjective/update_subjective_page.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart index b9315a28..98d1b7d0 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -166,8 +166,8 @@ class _UpdateSubjectivePageState extends State { MySelectedAllergy mySelectedAllergy = MySelectedAllergy( selectedAllergy: selectedAllergy, selectedAllergySeverity: selectedAllergySeverity); - - widget.myAllergiesList.add(mySelectedAllergy); + if (selectedAllergy != null && selectedAllergySeverity != null) + widget.myAllergiesList.add(mySelectedAllergy); }); } From e054c282342d8e5bf755ea7e97aea156721274d8 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 3 Jan 2021 11:27:03 +0200 Subject: [PATCH 2/2] hide text --- .../patients/profile/soap_update/update_assessment_page.dart | 1 + lib/widgets/patients/profile/soap_update/update_plan_page.dart | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart index 20684e19..3eec290c 100644 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart @@ -130,6 +130,7 @@ class _UpdateAssessmentPageState extends State { ), Column( children: [ + if(model.patientAssessmentList.isEmpty) Container( margin: EdgeInsets.only(left: 5, right: 5, top: 15), diff --git a/lib/widgets/patients/profile/soap_update/update_plan_page.dart b/lib/widgets/patients/profile/soap_update/update_plan_page.dart index d5ad12e9..9c851cd5 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -115,6 +115,7 @@ class _UpdatePlanPageState extends State { ), Column( children: [ + if(model.patientProgressNoteList.isEmpty) Container( margin: EdgeInsets.only(left: 10, right: 10, top: 15),