From 16bc4adcd73366d24b8c82ddccf620ea6b74cd7c Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Wed, 14 Apr 2021 14:53:35 +0300 Subject: [PATCH] hot fixes --- lib/client/base_app_client.dart | 2 +- lib/screens/medical-file/medical_file_page.dart | 2 +- .../patient-profile-header-new-design-app-bar.dart | 8 ++++---- .../profile/patient-profile-header-new-design.dart | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 2a89b765..21caa827 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -87,7 +87,7 @@ class BaseAppClient { print("URL : $url"); print("Body : ${json.encode(body)}"); String bodyData= json.encode(body); - var asd=""; + var asd = ""; if (await Helpers.checkConnection()) { diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index 00648473..bcdc8aa3 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -103,7 +103,7 @@ class _MedicalFilePageState extends State { context, MaterialPageRoute( builder: (context) => MedicalFileDetails( - age: patient.age, + age: patient.age??"", firstName: patient.firstName, lastName: patient.lastName, gender: patient.genderDescription, diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index 0b80c788..5d67fd81 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -157,7 +157,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget color: HexColor("#20A169"), ), child: AppText( - patient.startTime, + patient.startTime??"", color: Colors.white, fontSize: 1.5 * SizeConfig.textMultiplier, textAlign: TextAlign.center, @@ -210,7 +210,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget Row( children: [ AppText( - patient.nationalityName ?? patient.nationality, + patient.nationalityName ?? patient.nationality??'', fontWeight: FontWeight.bold, fontSize: 12, ), @@ -242,11 +242,11 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget ), children: [ new TextSpan( - text: TranslationBase.of(context).age + " : ", + text: TranslationBase.of(context).age??'' + " : ", style: TextStyle(fontSize: 14)), new TextSpan( text: - "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}", + "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth??"" : patient.dateofBirth??"", context)}", style: TextStyle( fontWeight: FontWeight.w700, fontSize: 14)), ], diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design.dart b/lib/widgets/patients/profile/patient-profile-header-new-design.dart index 922b1fe1..2453f382 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design.dart @@ -155,7 +155,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { color: HexColor("#20A169"), ), child: AppText( - patient.startTime, + patient.startTime??"", color: Colors.white, fontSize: 1.5 * SizeConfig.textMultiplier, textAlign: TextAlign.center, @@ -208,7 +208,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { Row( children: [ AppText( - patient.nationalityName ?? patient.nationality, + patient.nationalityName ?? patient.nationality??'', fontWeight: FontWeight.bold, fontSize: 12, ), @@ -244,7 +244,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { style: TextStyle(fontSize: 14)), new TextSpan( text: - "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}", + "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth ?? "" : patient.dateofBirth ?? "", context)}", style: TextStyle( fontWeight: FontWeight.w700, fontSize: 14)), ],