From 74b0bac517c1a3a25010d48b7ca767fa96f3fb70 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Wed, 21 Apr 2021 12:28:59 +0300 Subject: [PATCH 1/9] remove chart from procedure --- lib/screens/procedures/ProcedureCard.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index ed450df0..29a64a61 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -160,7 +160,7 @@ class ProcedureCard extends StatelessWidget { ), ], ), - Container( + /*Container( alignment: Alignment.centerRight, child: InkWell( onTap: () { @@ -180,7 +180,7 @@ class ProcedureCard extends StatelessWidget { color: Colors.blue, ), ), - ), + ),*/ // Row( // mainAxisAlignment: MainAxisAlignment.spaceBetween, // children: [ From 54482bfb1d53685fc9191791acf01afc55e3403f Mon Sep 17 00:00:00 2001 From: mosazaid Date: Wed, 21 Apr 2021 12:36:52 +0300 Subject: [PATCH 2/9] hot fix --- .../patients/profile/radiology/radiology_details_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/screens/patients/profile/radiology/radiology_details_page.dart b/lib/screens/patients/profile/radiology/radiology_details_page.dart index 61cc686c..438c3a75 100644 --- a/lib/screens/patients/profile/radiology/radiology_details_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_details_page.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'file:///C:/Users/admin/AndroidStudioProjects/doctor_app_flutter/lib/widgets/shared/buttons/secondary_button.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/secondary_button.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; From 6c3cb8cc94a7ffa52b0fcd56c48fab9fab6dd9b1 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Wed, 21 Apr 2021 12:45:03 +0300 Subject: [PATCH 3/9] hot fix --- lib/widgets/shared/app_texts_widget.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/shared/app_texts_widget.dart b/lib/widgets/shared/app_texts_widget.dart index 9acf6c96..d8d5a928 100644 --- a/lib/widgets/shared/app_texts_widget.dart +++ b/lib/widgets/shared/app_texts_widget.dart @@ -32,7 +32,7 @@ class AppText extends StatefulWidget { AppText( this.text, { this.color = Colors.black, - this.fontWeight = FontWeight.normal, + this.fontWeight, this.variant, this.fontSize, this.fontFamily = 'Poppins', From 21ef5ee56a39dd54b22432d731a78df3d7deadb6 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Wed, 21 Apr 2021 12:51:23 +0300 Subject: [PATCH 4/9] hot fix --- lib/widgets/shared/buttons/app_buttons_widget.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/shared/buttons/app_buttons_widget.dart b/lib/widgets/shared/buttons/app_buttons_widget.dart index e135310a..aa45acbb 100644 --- a/lib/widgets/shared/buttons/app_buttons_widget.dart +++ b/lib/widgets/shared/buttons/app_buttons_widget.dart @@ -107,7 +107,7 @@ class _AppButtonState extends State { shape: RoundedRectangleBorder( side: BorderSide( color: - widget.hasBorder ? widget.borderColor : widget.color, + widget.hasBorder ? widget.borderColor : widget.color ?? HexColor("#B8382C"), width: 0.8, ), borderRadius: BorderRadius.all(Radius.circular(widget.radius))), From 51234b80591bd3473e2acee795d2ffa1af8dabce Mon Sep 17 00:00:00 2001 From: mosazaid Date: Wed, 21 Apr 2021 12:53:41 +0300 Subject: [PATCH 5/9] hot fix --- lib/widgets/shared/buttons/app_buttons_widget.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/shared/buttons/app_buttons_widget.dart b/lib/widgets/shared/buttons/app_buttons_widget.dart index aa45acbb..36f9d983 100644 --- a/lib/widgets/shared/buttons/app_buttons_widget.dart +++ b/lib/widgets/shared/buttons/app_buttons_widget.dart @@ -107,7 +107,7 @@ class _AppButtonState extends State { shape: RoundedRectangleBorder( side: BorderSide( color: - widget.hasBorder ? widget.borderColor : widget.color ?? HexColor("#B8382C"), + widget.hasBorder ? widget.borderColor : widget.color ?? Color(0xFFB8382C), width: 0.8, ), borderRadius: BorderRadius.all(Radius.circular(widget.radius))), From 6c3d681387d58248d24b46aa5779d2bd09b56e8a Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 21 Apr 2021 13:03:52 +0300 Subject: [PATCH 6/9] hot fixes --- lib/screens/procedures/ProcedureCard.dart | 35 +++++++++++-------- .../entity_list_procedure_widget.dart | 2 +- lib/screens/procedures/procedure_screen.dart | 5 ++- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index ed450df0..865c6f48 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -1,6 +1,9 @@ +import 'package:doctor_app_flutter/client/base_app_client.dart'; +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/FlowChartPage.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; @@ -18,19 +21,20 @@ class ProcedureCard extends StatelessWidget { final int categoryID; final PatiantInformtion patient; - const ProcedureCard( - {Key key, - this.onTap, - this.entityList, - this.categoryID, - this.categoryName, - this.patient, - }) - : super(key: key); + const ProcedureCard({ + Key key, + this.onTap, + this.entityList, + this.categoryID, + this.categoryName, + this.patient, + }) : super(key: key); @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); + Map profile = sharedPref.getObj(DOCTOR_PROFILE); + DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); return Container( width: double.maxFinite, height: MediaQuery.of(context).size.height * .22, @@ -188,12 +192,13 @@ class ProcedureCard extends StatelessWidget { // entityList.remarks.toString() ?? '', // fontSize: 12, // ), - // if (entityList.categoryID == 2 || - // entityList.categoryID == 4) - // InkWell( - // child: Icon(DoctorApp.edit), - // onTap: onTap, - // ) + if (entityList.categoryID == 2 || + entityList.categoryID == 4 && + entityList.doctorName == doctorProfile.doctorName) + InkWell( + child: Icon(DoctorApp.edit), + onTap: onTap, + ) // ], // ) ], diff --git a/lib/screens/procedures/entity_list_procedure_widget.dart b/lib/screens/procedures/entity_list_procedure_widget.dart index 15fc27b6..b74ffa0d 100644 --- a/lib/screens/procedures/entity_list_procedure_widget.dart +++ b/lib/screens/procedures/entity_list_procedure_widget.dart @@ -67,7 +67,7 @@ class _ProcedureListWidgetState extends State { NetworkBaseView( baseViewModel: widget.model, child: Container( - height: MediaQuery.of(context).size.height * 0.55, + height: MediaQuery.of(context).size.height * 0.75, child: Center( child: Container( margin: EdgeInsets.only(top: 15), diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index ebeb1d4f..d81f95c0 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -1,6 +1,8 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; +import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/procedures/add-procedure-form.dart'; @@ -15,7 +17,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; - +import 'package:doctor_app_flutter/util/helpers.dart'; import 'ProcedureCard.dart'; class ProcedureScreen extends StatelessWidget { @@ -25,6 +27,7 @@ class ProcedureScreen extends StatelessWidget { PatiantInformtion patient = routeArgs['patient']; String patientType = routeArgs['patientType']; String arrivalType = routeArgs['arrivalType']; + return BaseView( onModelReady: (model) => model.getProcedure(mrn: patient.patientId, patientType: patientType), From dde8d9aa48cf2310bc1a254937cf700b06733b80 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Wed, 21 Apr 2021 13:19:15 +0300 Subject: [PATCH 7/9] design hot fixes --- .../vital_sign/vital_sign_details_screen.dart | 744 +++++++++--------- .../profile/vital_sign/vital_sign_item.dart | 18 +- 2 files changed, 387 insertions(+), 375 deletions(-) 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 8488c94d..a79bd20c 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 @@ -44,406 +44,414 @@ class VitalSignDetailsScreen extends StatelessWidget { appBarTitle: TranslationBase.of(context).vitalSign, body: mode.patientVitalSignsHistory.length > 0 ? Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.all(16.0), + children: [ + Expanded( + child: Container( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - "${patient.firstName ?? patient.patientDetails.firstName}'s", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.6, - fontWeight: FontWeight.w600, - ), - AppText( - TranslationBase.of(context).vitalSign, - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 3, - fontWeight: FontWeight.bold, - ) - ], - ), - ), - Container( - height: MediaQuery.of(context).size.height * 0.23, - width: double.infinity, - padding: EdgeInsets.all(12.0), - margin: EdgeInsets.symmetric(horizontal: 16.0), - decoration: BoxDecoration( - shape: BoxShape.rectangle, - color: Colors.white, - borderRadius: BorderRadius.circular(16), - border: Border.fromBorderSide(BorderSide( - color: Colors.grey.shade400, - width: 0.4, - )), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - "${TranslationBase.of(context).yourBodyMassIndex} ${mode.bodyMax}", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 2.0, - fontWeight: FontWeight.w700, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - mode.getBMIStatus() != 1 - ? '${assetBasePath}underweight_BMI.png' - : '${assetBasePath}underweight_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, - ), - const SizedBox( - height: 4, - ), - AppText( - "${TranslationBase.of(context).bmiUnderWeight}", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, - color: mode.getBMIStatus() == 1 - ? Color(0XFFD02127) - : null, - fontWeight: FontWeight.w700, - ), - AppText( - "(<18.5)", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, - color: mode.getBMIStatus() == 1 - ? Color(0XFFD02127) - : null, - fontWeight: FontWeight.w700, - ), - ], - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - mode.getBMIStatus() != 2 - ? '${assetBasePath}health_BMI.png' - : '${assetBasePath}health_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, - ), - const SizedBox( - height: 4, - ), - Container( - child: AppText( - "${TranslationBase.of(context).normal}", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 2 - ? Color(0XFFD02127) - : null, - ), - ), - AppText( - "(18.5-24.9)", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 2 - ? Color(0XFFD02127) - : null, - ), - ], - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Image.asset( - mode.getBMIStatus() != 3 - ? '${assetBasePath}ovrweight_BMI.png' - : '${assetBasePath}ovrweight_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, - ), - const SizedBox( - height: 4, - ), AppText( - "${TranslationBase.of(context).bmiOverWeight}", + "${patient.firstName ?? patient.patientDetails.firstName}'s", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.155, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 3 - ? Color(0XFFD02127) - : null, + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, ), AppText( - "(25-29.9)", + TranslationBase.of(context).vitalSign, fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.155, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 3 - ? Color(0XFFD02127) - : null, - ), + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.bold, + ) ], - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.23, + width: double.infinity, + padding: EdgeInsets.all(12.0), + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: Colors.white, + borderRadius: BorderRadius.circular(16), + border: Border.fromBorderSide(BorderSide( + color: Colors.grey.shade400, + width: 0.4, + )), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Image.asset( - mode.getBMIStatus() != 4 - ? '${assetBasePath}Obese_BMI.png' - : '${assetBasePath}Obese_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, - ), - const SizedBox( - height: 4, - ), AppText( - "${TranslationBase.of(context).bmiObese}", + "${TranslationBase.of(context).yourBodyMassIndex} ${mode.bodyMax}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: SizeConfig.textMultiplier * 2.0, fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 4 - ? Color(0XFFD02127) - : null, - ), - AppText( - "(30-34.9)", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 4 - ? Color(0XFFD02127) - : null, ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + mode.getBMIStatus() != 1 + ? '${assetBasePath}underweight_BMI.png' + : '${assetBasePath}underweight_BMI-r.png', + height: + MediaQuery.of(context).size.height * 0.10, + ), + const SizedBox( + height: 4, + ), + AppText( + "${TranslationBase.of(context).bmiUnderWeight}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.15, + color: mode.getBMIStatus() == 1 + ? Color(0XFFD02127) + : null, + fontWeight: FontWeight.w700, + ), + AppText( + "(<18.5)", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.15, + color: mode.getBMIStatus() == 1 + ? Color(0XFFD02127) + : null, + fontWeight: FontWeight.w700, + ), + ], + )), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + mode.getBMIStatus() != 2 + ? '${assetBasePath}health_BMI.png' + : '${assetBasePath}health_BMI-r.png', + height: + MediaQuery.of(context).size.height * 0.10, + ), + const SizedBox( + height: 4, + ), + Container( + child: AppText( + "${TranslationBase.of(context).normal}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 2 + ? Color(0XFFD02127) + : null, + ), + ), + AppText( + "(18.5-24.9)", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 2 + ? Color(0XFFD02127) + : null, + ), + ], + )), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + mode.getBMIStatus() != 3 + ? '${assetBasePath}ovrweight_BMI.png' + : '${assetBasePath}ovrweight_BMI-r.png', + height: + MediaQuery.of(context).size.height * 0.10, + ), + const SizedBox( + height: 4, + ), + AppText( + "${TranslationBase.of(context).bmiOverWeight}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.155, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 3 + ? Color(0XFFD02127) + : null, + ), + AppText( + "(25-29.9)", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.155, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 3 + ? Color(0XFFD02127) + : null, + ), + ], + )), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + mode.getBMIStatus() != 4 + ? '${assetBasePath}Obese_BMI.png' + : '${assetBasePath}Obese_BMI-r.png', + height: + MediaQuery.of(context).size.height * 0.10, + ), + const SizedBox( + height: 4, + ), + AppText( + "${TranslationBase.of(context).bmiObese}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 4 + ? Color(0XFFD02127) + : null, + ), + AppText( + "(30-34.9)", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 4 + ? Color(0XFFD02127) + : null, + ), + ], + )), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + mode.getBMIStatus() != 5 + ? '${assetBasePath}Obese_BMI.png' + : '${assetBasePath}Obese_BMI-r.png', + height: + MediaQuery.of(context).size.height * 0.10, + ), + const SizedBox( + height: 4, + ), + FittedBox( + fit: BoxFit.fitWidth, + child: AppText( + "${TranslationBase.of(context).bmiObeseExtreme}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 5 + ? Color(0XFFD02127) + : null, + ), + ), + AppText( + "(35<)", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 5 + ? Color(0XFFD02127) + : null, + ), + ], + )), + ], + ) ], - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - mode.getBMIStatus() != 5 - ? '${assetBasePath}Obese_BMI.png' - : '${assetBasePath}Obese_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, - ), - const SizedBox( - height: 4, - ), - FittedBox( - fit: BoxFit.fitWidth, - child: AppText( - "${TranslationBase.of(context).bmiObeseExtreme}", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 5 - ? Color(0XFFD02127) + ), + ), + Expanded( + child: Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 4), + child: GridView.count( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + crossAxisSpacing: 6, + mainAxisSpacing: 6, + childAspectRatio: 1.0 / 1.0, + crossAxisCount: 3, + children: [ + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: vitalSignDetails.Height, + pageTitle: + TranslationBase.of(context).height, + vitalList: + mode.patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) : null, - ), - ), - AppText( - "(35<)", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 5 - ? Color(0XFFD02127) - : null, - ), - ], - )), - ], - ) - ], - ), - ), - Expanded( - child: Container( - margin: EdgeInsets.symmetric(horizontal: 8.0), - child: GridView.count( - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - crossAxisSpacing: 4, - mainAxisSpacing: 4, - childAspectRatio: 1 / 1.0, - crossAxisCount: 3, - children: [ - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Height, - pageTitle: - TranslationBase.of(context).height, - vitalList: - mode.patientVitalSignsHistory, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, + child: Container( + child: VitalSignItem( + des: TranslationBase.of(context).height, + imagePath: "${assetBasePath}height.png", + lastVal: mode.heightCm, + unit: TranslationBase.of(context).cm, ), ), - ) - : null, - child: Container( - child: VitalSignItem( - des: TranslationBase.of(context).height, - imagePath: "${assetBasePath}height.png", - lastVal: mode.heightCm, - unit: TranslationBase.of(context).cm, - ), - ), - ), - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Weight, - pageTitle: - TranslationBase.of(context).weight, - vitalList: - mode.patientVitalSignsHistory, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, + ), + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: vitalSignDetails.Weight, + pageTitle: + TranslationBase.of(context).weight, + vitalList: + mode.patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context).weight, + imagePath: "${assetBasePath}weight.png", + unit: TranslationBase.of(context).kg, + lastVal: mode.weightKg, ), - ) - : null, - child: VitalSignItem( - des: TranslationBase.of(context).weight, - imagePath: "${assetBasePath}weight.png", - unit: TranslationBase.of(context).kg, - lastVal: mode.weightKg, - ), - ), - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Temperature, - pageTitle: TranslationBase.of(context) - .temperature, - vitalList: - mode.patientVitalSignsHistory, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, + ), + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: vitalSignDetails.Temperature, + pageTitle: TranslationBase.of(context) + .temperature, + vitalList: + mode.patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: Container( + child: VitalSignItem( + des: TranslationBase.of(context).temperature, + imagePath: "${assetBasePath}temperature.png", + lastVal: mode.temperatureCelcius, + unit: TranslationBase.of(context).tempC, ), ), - ) - : null, - child: Container( - child: VitalSignItem( - des: TranslationBase.of(context).temperature, - imagePath: "${assetBasePath}temperature.png", - lastVal: mode.temperatureCelcius, - unit: TranslationBase.of(context).tempC, - ), - ), - ), - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.heart, - pageTitle: - TranslationBase.of(context).heart, - vitalList: - mode.patientVitalSignsHistory, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, + ), + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: vitalSignDetails.heart, + pageTitle: + TranslationBase.of(context).heart, + vitalList: + mode.patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context).heart, + imagePath: "${assetBasePath}heart_rate.png", + lastVal: mode.hartRat, + unit: TranslationBase.of(context).bpm, ), - ) - : null, - child: VitalSignItem( - des: TranslationBase.of(context).heart, - imagePath: "${assetBasePath}heart_rate.png", - lastVal: mode.hartRat, - unit: TranslationBase.of(context).bpm, - ), - ), - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Respiration, - pageTitle: TranslationBase.of(context) - .respirationRate, - vitalList: - mode.patientVitalSignsHistory, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, + ), + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: vitalSignDetails.Respiration, + pageTitle: TranslationBase.of(context) + .respirationRate, + vitalList: + mode.patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context).respirationRate, + imagePath: "${assetBasePath}respiration_rate.png", + lastVal: mode.respirationBeatPerMinute, + unit: + TranslationBase.of(context).respirationSigns, ), - ) - : null, - child: VitalSignItem( - des: TranslationBase.of(context).respirationRate, - imagePath: "${assetBasePath}respiration_rate.png", - lastVal: mode.respirationBeatPerMinute, - unit: - TranslationBase.of(context).respirationSigns, - ), - ), - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.BloodPressure, - pageTitle: TranslationBase.of(context) - .bloodPressure, - vitalList: - mode.patientVitalSignsHistory, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, + ), + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: vitalSignDetails.BloodPressure, + pageTitle: TranslationBase.of(context) + .bloodPressure, + vitalList: + mode.patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context).bloodPressure, + imagePath: "${assetBasePath}blood_pressure.png", + lastVal: mode.bloodPressure, + unit: TranslationBase.of(context).sysDias, ), - ) - : null, - child: VitalSignItem( - des: TranslationBase.of(context).bloodPressure, - imagePath: "${assetBasePath}blood_pressure.png", - lastVal: mode.bloodPressure, - unit: TranslationBase.of(context).sysDias, + ), + ], + ), ), ), ], ), - ), ), - ], - ) + ), + ], + ) : Center( child: Column( crossAxisAlignment: CrossAxisAlignment.center, diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_item.dart b/lib/screens/patients/profile/vital_sign/vital_sign_item.dart index 3431a011..a24d1a6b 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_item.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_item.dart @@ -55,13 +55,17 @@ class VitalSignItem extends StatelessWidget { margin: 0, ), Expanded( - child: AppText( - "$unit", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.2, - fontWeight: FontWeight.w700, - color: HexColor('#B8382C'), - margin: 0, + child: Column( + children: [ + AppText( + "$unit", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.2, + fontWeight: FontWeight.w700, + color: Color(0xFFB8382C), + margin: 0, + ), + ], ), ), ], From 5bd50caa228e6937cae61d535e458f8219b4234e Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 21 Apr 2021 15:47:40 +0300 Subject: [PATCH 8/9] hot fixes --- lib/screens/procedures/ProcedureCard.dart | 40 ++++++++++---------- lib/screens/procedures/procedure_screen.dart | 17 +++++---- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index 865c6f48..f165291f 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/client/base_app_client.dart'; +//import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; @@ -20,6 +20,7 @@ class ProcedureCard extends StatelessWidget { final String categoryName; final int categoryID; final PatiantInformtion patient; + final String doctorName; const ProcedureCard({ Key key, @@ -28,13 +29,12 @@ class ProcedureCard extends StatelessWidget { this.categoryID, this.categoryName, this.patient, + this.doctorName, }) : super(key: key); - @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); - Map profile = sharedPref.getObj(DOCTOR_PROFILE); - DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); + return Container( width: double.maxFinite, height: MediaQuery.of(context).size.height * .22, @@ -185,22 +185,22 @@ class ProcedureCard extends StatelessWidget { ), ), ), - // Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // AppText( - // entityList.remarks.toString() ?? '', - // fontSize: 12, - // ), - if (entityList.categoryID == 2 || - entityList.categoryID == 4 && - entityList.doctorName == doctorProfile.doctorName) - InkWell( - child: Icon(DoctorApp.edit), - onTap: onTap, - ) - // ], - // ) + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + AppText( + entityList.remarks.toString() ?? '', + fontSize: 12, + ), + if (entityList.categoryID == 2 || + entityList.categoryID == 4 && + doctorName == entityList.doctorName) + InkWell( + child: Icon(DoctorApp.edit), + onTap: onTap, + ) + ], + ) ], ), //onTap: onTap, diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index d81f95c0..1371df83 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/client/base_app_client.dart'; +//import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; @@ -8,19 +8,21 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/procedures/add-procedure-form.dart'; import 'package:doctor_app_flutter/screens/procedures/update-procedure.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; -import 'package:doctor_app_flutter/util/helpers.dart'; import 'ProcedureCard.dart'; class ProcedureScreen extends StatelessWidget { + String doctorNameP; + + void initState() async { + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); + doctorNameP = doctorProfile.doctorName; + } + @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; @@ -177,6 +179,7 @@ class ProcedureScreen extends StatelessWidget { // 'You Cant Update This Procedure'); }, patient: patient, + doctorName: doctorNameP, ), ), if (model.procedureList.length != 0 && From 6a33f60bad5e59a6e6f6dc4bb0fa49c74943b745 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 21 Apr 2021 15:49:58 +0300 Subject: [PATCH 9/9] hot fixes --- pubspec.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index d338a618..e9386145 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -608,7 +608,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.4" mime: dependency: transitive description: @@ -900,7 +900,7 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0-nullsafety.2" sticky_headers: dependency: "direct main" description: @@ -1091,5 +1091,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0 <2.11.0" + dart: ">=2.10.0 <=2.11.0-213.1.beta" flutter: ">=1.22.0 <2.0.0"