From c6bbc1c2f5373fb0ac6eaabb62cce1422f311bf0 Mon Sep 17 00:00:00 2001 From: Mohammad ALjammal Date: Tue, 2 Jun 2020 17:41:32 +0300 Subject: [PATCH] fix patient profile details --- lib/config/config.dart | 2 +- .../vital_sign/vital_sign_details_screen.dart | 87 ++++++++++--------- 2 files changed, 49 insertions(+), 40 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index b3dd7255..24c2586a 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -3,7 +3,7 @@ const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z]"; const ONLY_DATE = "[0-9/]"; -const BASE_URL = 'https://hmgwebservices.com/Services/'; +const BASE_URL = 'https://uat.hmgwebservices.com/Services/'; const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems"; const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList"; const PATIENT_PROGRESS_NOTE_URL = "DoctorApplication.svc/REST/GetProgressNoteForInPatient"; diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart index fc25928a..8b9cbead 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -89,13 +89,13 @@ class _VitalSignDetailsScreenState extends State { 'key': vitalSignDetails.bodyMeasurements }); }, - child: VitalSignItem( - des: 'Body Measurements', - url: url + 'heartbeat.png', - lastVal: patientsProv - .patientVitalSignOrderdSubList[0].heightCm - .toString(), - unit: 'Cm', + child: Expanded( + child: VitalSignItem( + des: 'Body Measurements', + url: url + 'heartbeat.png', + lastVal: '137', + unit: 'Cm', + ), ), ), InkWell( @@ -106,9 +106,11 @@ class _VitalSignDetailsScreenState extends State { 'key': vitalSignDetails.temperature }); }, - child: VitalSignItem( - des: 'Temperature', - url: url + 'heartbeat.png', + child: Expanded( + child: VitalSignItem( + des: 'Temperature', + url: url + 'heartbeat.png', + ), ), ), ], @@ -219,6 +221,7 @@ class VitalSignItem extends StatelessWidget { @override Widget build(BuildContext context) { return RoundedContainer( + margin: 0.025 * SizeConfig.realScreenWidth, height: 0.14 * SizeConfig.realScreenHeight, width: 0.45 * SizeConfig.realScreenWidth, child: Container( @@ -227,37 +230,43 @@ class VitalSignItem extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - des, - style: TextStyle( - fontSize: 1.7 * SizeConfig.textMultiplier, - color: Theme.of(context).primaryColor, - fontWeight: FontWeight.bold), + Expanded( + flex: 2, + child: Text( + des, + style: TextStyle( + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Theme.of(context).primaryColor, + fontWeight: FontWeight.bold), + ), ), - Column( - // mainAxisAlignment: MainAxisAlignment.spaceEvenly, - // crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Image.asset( - url, - height: SizeConfig.heightMultiplier * 7, - ), - ), - Expanded( - child: RichText( - text: TextSpan( - style: TextStyle(color: Colors.black), - children: [ - new TextSpan(text: lastVal), - new TextSpan( - text: ' ${unit}', - style: - TextStyle(color: Theme.of(context).primaryColor)), - ], + Expanded( + flex: 1, + child: Column( + // mainAxisAlignment: MainAxisAlignment.spaceEvenly, + // crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Image.asset( + url, + height: SizeConfig.heightMultiplier * 7, + ), ), - )) - ], + Expanded( + child: RichText( + text: TextSpan( + style: TextStyle(color: Colors.black), + children: [ + new TextSpan(text: lastVal), + new TextSpan( + text: ' ${unit}', + style: + TextStyle(color: Theme.of(context).primaryColor)), + ], + ), + )) + ], + ), ) ], ),