From 9d4584097d20a6567d9a284ab6d756aa7c5117b5 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 13 Apr 2021 12:34:16 +0300 Subject: [PATCH 1/5] fix flag on slider --- assets/images/saudi-arabia-flag.png | Bin 0 -> 760 bytes assets/images/usa-flag.png | Bin 0 -> 595 bytes lib/screens/profile_screen.dart | 8 +++--- lib/widgets/shared/app_drawer_widget.dart | 29 ++++++++++++++------- lib/widgets/shared/drawer_item_widget.dart | 10 ++++++- 5 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 assets/images/saudi-arabia-flag.png create mode 100644 assets/images/usa-flag.png diff --git a/assets/images/saudi-arabia-flag.png b/assets/images/saudi-arabia-flag.png new file mode 100644 index 0000000000000000000000000000000000000000..932eb11ace10469245e326640c6dc6eeab402aa0 GIT binary patch literal 760 zcmVPx#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR917N7$F z1ONa40RR915C8xG0I;d#zyJUOZb?KzR5%f}luJ(&Q547jcc#x7`m#-1pcSZ!jmAXO zXu?j7x-4<$j*lSUz>RA@fQiAi(csF&C8>!fE>spEXoHd#Vr$FLcRLTyy=0mWC>!)N zXYTaebAEFkcZOkcE{s-l5x^X2nDnHw1VvqNq19RiAyhR9bAHbm< q2RgjRhh@;w>ytW!v1jlr4}Sy24d@wB+4?sC0000TzkQp z+etLVQJ}P5WwMXZ{=jZIvAa57nhk!cz293|d4EG%vF-%D`yqjszSszUsp6`0Rq7HE z>tf08+xIwhKX=2$&ozRprdqvH{=W2bP-kAqDxtzT3(UeCuY|7%s(*Q1;9ai5ocUF8 z9~nQ+J0f{~WnRT4$2CD7=UvxJAO6lFJ1MD6{KxKptY+qG9?IN*ZN5XBRiv{@WmO2% z<2zq2iD$&e9A4{xV09O}{o%c=#|&eN=4A4|9PO+e2#DVdGp%2 zj(PKzef+ZIuSwFD_2D{s^WO_^H+dz@)>FVdQ&MBb@0CU0lZ~y=R literal 0 HcmV?d00001 diff --git a/lib/screens/profile_screen.dart b/lib/screens/profile_screen.dart index 283649aa..1e9e2459 100644 --- a/lib/screens/profile_screen.dart +++ b/lib/screens/profile_screen.dart @@ -57,25 +57,25 @@ class _ProfileScreenState extends State { children: [ DrawerItem( TranslationBase.of(context).gender, - Icons.person_pin, + icon: Icons.person_pin, color: Colors.black, subTitle: doctorProfile.genderDescription //"Male" , ), - DrawerItem(TranslationBase.of(context).clinic, Icons.build, + DrawerItem(TranslationBase.of(context).clinic, icon: Icons.build, color: Colors.black, subTitle: doctorProfile.clinicDescription //"Neurology Clinic", ), DrawerItem( TranslationBase.of(context).hospital, - Icons.local_hospital, + icon: Icons.local_hospital, color: Colors.black, subTitle: doctorProfile.projectName, //"Al-Takkassussi", ), DrawerItem( TranslationBase.of(context).speciality, - Icons.crop_square, + icon: Icons.crop_square, color: Colors.black, subTitle: doctorProfile.doctorRate == 0 ? TranslationBase.of(context).beingBad diff --git a/lib/widgets/shared/app_drawer_widget.dart b/lib/widgets/shared/app_drawer_widget.dart index 324269c6..ee4e7aaf 100644 --- a/lib/widgets/shared/app_drawer_widget.dart +++ b/lib/widgets/shared/app_drawer_widget.dart @@ -113,7 +113,7 @@ class _AppDrawerState extends State { InkWell( child: DrawerItem( TranslationBase.of(context).applyOrRescheduleLeave, - DoctorApp.reschedule__1, + icon: DoctorApp.reschedule__1, // subTitle: , ), onTap: () { @@ -129,8 +129,10 @@ class _AppDrawerState extends State { SizedBox(height: 15), InkWell( child: DrawerItem( - TranslationBase.of(context).myQRCode, - DoctorApp.qr_code_3, + TranslationBase + .of(context) + .myQRCode, + icon: DoctorApp.qr_code_3, // subTitle: , ), ), @@ -149,7 +151,7 @@ class _AppDrawerState extends State { ), ), SizedBox( - height: 130, + height: MediaQuery.of(context).size.height * 0.09, ), Container( margin: EdgeInsets.symmetric(horizontal: 20), @@ -157,10 +159,17 @@ class _AppDrawerState extends State { children: [ InkWell( child: DrawerItem( - projectsProvider.isArabic - ? TranslationBase.of(context).lanEnglish - : TranslationBase.of(context).lanArabic, - DoctorApp.qr_code), + projectsProvider.isArabic + ? TranslationBase + .of(context) + .lanEnglish + : TranslationBase + .of(context) + .lanArabic, + // icon: DoctorApp.qr_code, + assetLink: projectsProvider.isArabic + ? 'assets/images/usa-flag.png' + : 'assets/images/saudi-arabia-flag.png',), onTap: () { if (projectsProvider.isArabic) projectsProvider.changeLanguage('en'); @@ -171,7 +180,9 @@ class _AppDrawerState extends State { SizedBox(height: 10), InkWell( child: DrawerItem( - TranslationBase.of(context).logout, DoctorApp.logout_1), + TranslationBase + .of(context) + .logout, icon: DoctorApp.logout_1,), onTap: () async { Navigator.pop(context); await helpers.logout(); diff --git a/lib/widgets/shared/drawer_item_widget.dart b/lib/widgets/shared/drawer_item_widget.dart index 1a34a8ca..3dcac4c9 100644 --- a/lib/widgets/shared/drawer_item_widget.dart +++ b/lib/widgets/shared/drawer_item_widget.dart @@ -15,8 +15,9 @@ class DrawerItem extends StatefulWidget { final String subTitle; final IconData icon; final Color color; + final String assetLink; - DrawerItem(this.title, this.icon, {this.color, this.subTitle = ''}); + DrawerItem(this.title, {this.icon, this.color, this.subTitle = '', this.assetLink}); @override _DrawerItemState createState() => _DrawerItemState(); @@ -30,6 +31,13 @@ class _DrawerItemState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ + if(widget.assetLink!=null) + Container( + height: 20, + width: 20, + child: Image.asset(widget.assetLink), + ), + if(widget.assetLink==null) Icon( widget.icon, color: widget.color ?? Colors.black87, From ff157b417e116bec3481eef2889c24cd4a1eaa42 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 13 Apr 2021 13:47:17 +0300 Subject: [PATCH 2/5] fix add medication and soap index --- lib/screens/dashboard_screen.dart | 12 ++-- .../soap_update/expandable_SOAP_widget.dart | 1 - .../profile/soap_update/steps_widget.dart | 40 ++++++----- .../subjective/update_medication_widget.dart | 72 ++++++++++++------- .../soap_update/update_soap_index.dart | 27 ++++++- 5 files changed, 102 insertions(+), 50 deletions(-) diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 13e17077..b0c3bcde 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -1020,12 +1020,12 @@ class _DashboardScreenState extends State { ), hasBorder: false, onTap: () { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => - // SearchMedicinePatientScreen(), - // )); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + SearchMedicinePatientScreen(), + )); }, ) ], diff --git a/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart b/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart index 32876539..81bdf613 100644 --- a/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart +++ b/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart @@ -44,7 +44,6 @@ class ExpandableSOAPWidget extends StatelessWidget { if(isRequired) Icon( FontAwesomeIcons.asterisk, - color: AppGlobal.appPrimaryColor, size: 12, ) ], diff --git a/lib/widgets/patients/profile/soap_update/steps_widget.dart b/lib/widgets/patients/profile/soap_update/steps_widget.dart index b1432752..973c4138 100644 --- a/lib/widgets/patients/profile/soap_update/steps_widget.dart +++ b/lib/widgets/patients/profile/soap_update/steps_widget.dart @@ -24,19 +24,23 @@ class StepsWidget extends StatelessWidget { height: height == 0 ? 150 : height, width: MediaQuery.of(context).size.width * 0.9, color: Colors.transparent, - child: Center( - child: Container( - width: MediaQuery.of(context).size.width * 0.86, - child: Divider( - color: Colors.grey, - height: 0.75, - thickness: 0.75, - ), - ), - ), + // child:, ), Positioned( - top: 43, + top: 30 + , + child: Center( + child: Container( + width: MediaQuery.of(context).size.width * 0.9, + child: Divider( + color: Colors.grey, + height: 0.75, + thickness: 0.75, + ), + ), + )), + Positioned( + top: 10, left: 0, child: InkWell( onTap: () => changeCurrentTab(0), @@ -87,7 +91,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, left: MediaQuery .of(context) .size @@ -143,7 +147,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, left: MediaQuery .of(context) .size @@ -201,7 +205,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, right: 0, child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(4) : null, @@ -271,7 +275,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, right: 0, child: InkWell( onTap: () => changeCurrentTab(0), @@ -321,7 +325,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, right: MediaQuery .of(context) .size @@ -374,7 +378,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, right: MediaQuery .of(context) .size @@ -432,7 +436,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, left: 0, child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(4) : null, diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart index 2d9f5cd5..440252fa 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart @@ -1,4 +1,5 @@ import 'package:autocomplete_textfield/autocomplete_textfield.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; @@ -41,30 +42,52 @@ class _UpdateMedicationWidgetState extends State { return Column( children: [ - Container( - child: TextFields( - hintText: TranslationBase.of(context).addMedication, - borderColor: HexColor('#707070'), - borderWidth: 0.30, - fontSize: 13.5, - borderRadius: 12, - onTapTextFields: () { - openMedicationList(context); - }, - readOnly: true, - // hintColor: Colors.black, - suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: Color(0xFF2B353E), - fontWeight: FontWeight.w600, - // controller: messageController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), + InkWell( + onTap: () { + openMedicationList(context); + }, + child: Container( + padding: EdgeInsets.symmetric( + vertical: 8, horizontal: 8.0), + margin: + EdgeInsets.symmetric(vertical: 8), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey.shade400, + width: 0.5), + borderRadius: BorderRadius.all( + Radius.circular(8), + ), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + "${TranslationBase.of(context).addMedication}", + fontSize: SizeConfig + .textMultiplier * + 1.8, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + ], + )), + Icon( + Icons.add_box_rounded, + size: 25, + ) + ], + ), + ), ), SizedBox( height: 20, @@ -78,6 +101,7 @@ class _UpdateMedicationWidgetState extends State { showModalBottomSheet( backgroundColor: Colors.white, isScrollControlled: true, + isDismissible: false, context: context, builder: (context) { return AddMedication( diff --git a/lib/widgets/patients/profile/soap_update/update_soap_index.dart b/lib/widgets/patients/profile/soap_update/update_soap_index.dart index 0c69d71d..2f839633 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; @@ -6,11 +7,13 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_history.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/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_plan_page.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:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -79,6 +82,7 @@ class _UpdateSoapIndexState extends State color: Theme.of(context).scaffoldBackgroundColor), child: Column( mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ // PatientPageHeaderWidget(patient), PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,), @@ -87,6 +91,27 @@ class _UpdateSoapIndexState extends State height: 1, color: Color(0xffCCCCCC), ), + Container( + margin: EdgeInsets.only( + top: 10, + left: MediaQuery.of(context).size.width * 0.05, + right: MediaQuery.of(context).size.width * 0.05), + + child: AppText( + TranslationBase.of(context).createNew, + fontSize: 3 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w500, + ), + ), + Container( + margin: EdgeInsets.only( + left: MediaQuery.of(context).size.width * 0.05, + right: MediaQuery.of(context).size.width * 0.05), + child: AppText(TranslationBase.of(context).episode, + fontSize: 3.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + ), Container( color: Theme.of(context).scaffoldBackgroundColor, margin: EdgeInsets.only( @@ -95,7 +120,7 @@ class _UpdateSoapIndexState extends State child: StepsWidget( index: _currentIndex, changeCurrentTab: changePageViewIndex, - height: 135,//MediaQuery.of(context).size.height * 0.17, + height: 100,//MediaQuery.of(context).size.height * 0.17, ), ), Container( From e9d04527a67b3c369e869ed9d09e622adbd0d20e Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 13 Apr 2021 14:47:07 +0300 Subject: [PATCH 3/5] add stepper in all soap steps --- .../profile/soap_update/SOAP_step_header.dart | 45 +++ .../objective/update_objective_page.dart | 7 +- .../subjective/update_subjective_page.dart | 14 +- .../soap_update/update_assessment_page.dart | 13 +- .../profile/soap_update/update_plan_page.dart | 336 +++++++++--------- .../soap_update/update_soap_index.dart | 37 +- 6 files changed, 244 insertions(+), 208 deletions(-) create mode 100644 lib/widgets/patients/profile/soap_update/SOAP_step_header.dart diff --git a/lib/widgets/patients/profile/soap_update/SOAP_step_header.dart b/lib/widgets/patients/profile/soap_update/SOAP_step_header.dart new file mode 100644 index 00000000..dcd0daa1 --- /dev/null +++ b/lib/widgets/patients/profile/soap_update/SOAP_step_header.dart @@ -0,0 +1,45 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class SOAPStepHeader extends StatelessWidget { + const SOAPStepHeader({ + Key key, + this.currentIndex, this.changePageViewIndex, + }) : super(key: key); + + final int currentIndex; + final Function changePageViewIndex; + + @override + Widget build(BuildContext context) { + return Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).createNew, + fontSize: 3 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w500, + ), + AppText(TranslationBase.of(context).episode, + fontSize: 3.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + Container( + color: Theme.of(context).scaffoldBackgroundColor, + child: StepsWidget( + index: currentIndex, + changeCurrentTab: changePageViewIndex, + height: 100,//MediaQuery.of(context).size.height * 0.17, + ), + ), + SizedBox( + height: 30, + ), + ], + ); + } +} diff --git a/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart b/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart index e8c3b831..ce0f6064 100644 --- a/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart +++ b/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart @@ -26,13 +26,14 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; +import '../SOAP_step_header.dart'; import 'examination-item-card.dart'; import 'objective-add-examination-page.dart'; class UpdateObjectivePage extends StatefulWidget { final Function changePageViewIndex; final Function changeLoadingState; - + final int currentIndex; final List mySelectedExamination; final PatiantInformtion patientInfo; @@ -41,7 +42,7 @@ class UpdateObjectivePage extends StatefulWidget { this.changePageViewIndex, this.mySelectedExamination, this.patientInfo, - this.changeLoadingState}); + this.changeLoadingState, this.currentIndex}); @override _UpdateObjectivePageState createState() => _UpdateObjectivePageState(); @@ -108,6 +109,8 @@ class _UpdateObjectivePageState extends State { body: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ + SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex), + Expanded( child: SingleChildScrollView( physics: ScrollPhysics(), 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 2d475624..68e02e2e 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 @@ -1,5 +1,6 @@ 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/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; @@ -21,10 +22,13 @@ import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjecti import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_history_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_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:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; +import '../SOAP_step_header.dart'; import '../expandable_SOAP_widget.dart'; +import '../steps_widget.dart'; class UpdateSubjectivePage extends StatefulWidget { final Function changePageViewIndex; @@ -32,13 +36,14 @@ class UpdateSubjectivePage extends StatefulWidget { final List myAllergiesList; final List myHistoryList; final PatiantInformtion patientInfo; + final int currentIndex; UpdateSubjectivePage( {Key key, this.changePageViewIndex, this.myAllergiesList, this.myHistoryList, - this.patientInfo, this.changeLoadingState}); + this.patientInfo, this.changeLoadingState, this.currentIndex}); @override _UpdateSubjectivePageState createState() => _UpdateSubjectivePageState(); @@ -231,10 +236,10 @@ class _UpdateSubjectivePageState extends State { widthFactor: 0.9, child: Column( mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox( - height: 30, - ), + + SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex), ExpandableSOAPWidget( headerTitle: TranslationBase.of(context) .chiefComplaints @@ -535,3 +540,4 @@ class _UpdateSubjectivePageState extends State { + 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 0cf6303d..475596d4 100644 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart @@ -14,6 +14,7 @@ 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/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; @@ -28,6 +29,7 @@ import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; +import 'SOAP_step_header.dart'; import 'custom_validation_error.dart'; class UpdateAssessmentPage extends StatefulWidget { @@ -35,13 +37,13 @@ class UpdateAssessmentPage extends StatefulWidget { List mySelectedAssessmentList; final PatiantInformtion patientInfo; final Function changeLoadingState; - + final int currentIndex; UpdateAssessmentPage( {Key key, this.changePageViewIndex, this.mySelectedAssessmentList, this.patientInfo, - this.changeLoadingState}); + this.changeLoadingState, this.currentIndex}); @override _UpdateAssessmentPageState createState() => _UpdateAssessmentPageState(); @@ -122,9 +124,7 @@ class _UpdateAssessmentPageState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.start, children: [ - SizedBox( - height: 30, - ), + SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex), Container( width: double.infinity, margin: EdgeInsets.only(top: 10, left: 10, right: 10), @@ -689,7 +689,8 @@ class _AddAssessmentDetailsState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox( + + SizedBox( height: 16, ), Row( 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 5c69a8ae..fecb6a14 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -1,6 +1,4 @@ -import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; -import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; @@ -13,31 +11,33 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.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/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_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/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; -import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'SOAP_step_header.dart'; + class UpdatePlanPage extends StatefulWidget { final Function changePageViewIndex; final PatiantInformtion patientInfo; final Function changeLoadingState; - GetPatientProgressNoteResModel patientProgressNote; + + final int currentIndex; + GetPatientProgressNoteResModel patientProgressNote; UpdatePlanPage( {Key key, this.changePageViewIndex, this.patientInfo, this.changeLoadingState, - this.patientProgressNote}); + this.patientProgressNote, + this.currentIndex}); @override _UpdatePlanPageState createState() => _UpdatePlanPageState(); @@ -96,185 +96,193 @@ class _UpdatePlanPageState extends State { child: Center( child: FractionallySizedBox( widthFactor: 0.95, - child: Container( - margin: EdgeInsets.all(8.0), - padding: EdgeInsets.all(12.0), - decoration: BoxDecoration( - shape: BoxShape.rectangle, - color: Colors.white, - borderRadius: BorderRadius.circular(12), - border: Border.fromBorderSide(BorderSide( - color: Colors.grey.shade400, - width: 0.4, - )), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 10, + child: Column( + children: [ + SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex), + + SizedBox(height: 10,), + Container( + margin: EdgeInsets.all(8.0), + padding: EdgeInsets.all(12.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: Colors.white, + borderRadius: BorderRadius.circular(12), + border: Border.fromBorderSide(BorderSide( + color: Colors.grey.shade400, + width: 0.4, + )), ), - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Row( - children: [ - Texts(TranslationBase - .of(context) - .progressNoteSOAP, - variant: isProgressNoteExpand ? "bodyText" : '', - bold: isProgressNoteExpand ? true : false, - color: Colors.black), - Icon( - FontAwesomeIcons.asterisk, - color: Colors.black, - size: 12, - ) - ], - ), - InkWell( - onTap: () { - setState(() { - isProgressNoteExpand = !isProgressNoteExpand; - }); - }, - child: Icon(isProgressNoteExpand - ? Icons.keyboard_arrow_up - : Icons.keyboard_arrow_down)) - ], - ), - bodyWidget: Column(children: [ + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( - height: 2, + height: 10, ), - Column( - children: [ - if(widget.patientProgressNote.planNote == null) - Container( - margin: - EdgeInsets.only(left: 10, right: 10, top: 15), - - child: AppTextFieldCustom( - hintText: TranslationBase.of(context).progressNote, - controller: progressNoteController, - minLines: 2, - maxLines: 4, - inputType: TextInputType.multiline, - onChanged: (value){ - // examination.remark = value; + HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Row( + children: [ + Texts(TranslationBase + .of(context) + .progressNoteSOAP, + variant: isProgressNoteExpand ? "bodyText" : '', + bold: isProgressNoteExpand ? true : false, + color: Colors.black), + Icon( + FontAwesomeIcons.asterisk, + color: Colors.black, + size: 12, + ) + ], + ), + InkWell( + onTap: () { + setState(() { + isProgressNoteExpand = !isProgressNoteExpand; + }); }, - ), - ), + child: Icon(isProgressNoteExpand + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down)) + ], + ), + bodyWidget: Column(children: [ SizedBox( - height: 20, + height: 2, ), - if ( widget.patientProgressNote.planNote != null) - Container( - margin: - EdgeInsets.only(left: 5, right: 5, top: 15), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - - SizedBox( - height: 8, + Column( + children: [ + if(widget.patientProgressNote.planNote == null) + Container( + margin: + EdgeInsets.only(left: 10, right: 10, top: 15), + + child: AppTextFieldCustom( + hintText: TranslationBase.of(context).progressNote, + controller: progressNoteController, + minLines: 2, + maxLines: 4, + inputType: TextInputType.multiline, + onChanged: (value){ + // examination.remark = value; + }, ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, + ), + SizedBox( + height: 20, + ), + if ( widget.patientProgressNote.planNote != null) + Container( + margin: + EdgeInsets.only(left: 5, right: 5, top: 15), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, children: [ + + SizedBox( + height: 8, + ), Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - Texts('Appointment No: '), - Texts(widget.patientProgressNote.appointmentNo.toString()), + Row( + children: [ + Texts('Appointment No: '), + Texts(widget.patientProgressNote.appointmentNo.toString()), + + ], + ), + AppText( + widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()), + fontWeight: FontWeight + .bold, + fontSize: 16, + ) ], ), - AppText( - widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()), - fontWeight: FontWeight - .bold, - fontSize: 16, - ) - - ], - ), - Row( - children: [ - Texts('Condition: '), - Texts(widget.patientProgressNote.mName.toString()), + Row( + children: [ + Texts('Condition: '), + Texts(widget.patientProgressNote.mName.toString()), - ], - ), - if(widget.patientProgressNote.createdByName !=null) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).createdBy, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - AppText( - widget.patientProgressNote.createdByName??"", - fontSize: 10, - color: Colors.grey, - ), - ], - ), - if(widget.patientProgressNote.editedByName !=null) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).editedBy, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - AppText( - widget.patientProgressNote.editedByName??"", - fontSize: 10, - color: Colors.grey, + ], ), - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - SizedBox( - height: 6, + if(widget.patientProgressNote.createdByName !=null) + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).createdBy, + fontWeight: FontWeight.bold, + fontSize: 16, + ), + AppText( + widget.patientProgressNote.createdByName??"", + fontSize: 10, + color: Colors.grey, + ), + ], ), - Padding( - padding: const EdgeInsets.all(0.0), - child: Container( - width: MediaQuery.of(context) - .size - .width * - 0.6, - child: Texts( - progressNoteController.text, + if(widget.patientProgressNote.editedByName !=null) + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).editedBy, + fontWeight: FontWeight.bold, + fontSize: 16, + ), + AppText( + widget.patientProgressNote.editedByName??"", fontSize: 10, color: Colors.grey, ), - ), + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + SizedBox( + height: 6, + ), + Padding( + padding: const EdgeInsets.all(0.0), + child: Container( + width: MediaQuery.of(context) + .size + .width * + 0.6, + child: Texts( + progressNoteController.text, + fontSize: 10, + color: Colors.grey, + ), + ), + ), + ], ), ], ), - ], - ), - ) - ], - ) - ]), - isExpand: isProgressNoteExpand, - ), + ) + ], + ) + ]), + isExpand: isProgressNoteExpand, + ), - ], - ), + ], + ), + ), + ], ), ), ), diff --git a/lib/widgets/patients/profile/soap_update/update_soap_index.dart b/lib/widgets/patients/profile/soap_update/update_soap_index.dart index 2f839633..afeeca4b 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -91,41 +91,10 @@ class _UpdateSoapIndexState extends State height: 1, color: Color(0xffCCCCCC), ), - Container( - margin: EdgeInsets.only( - top: 10, - left: MediaQuery.of(context).size.width * 0.05, - right: MediaQuery.of(context).size.width * 0.05), - child: AppText( - TranslationBase.of(context).createNew, - fontSize: 3 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w500, - ), - ), - Container( - margin: EdgeInsets.only( - left: MediaQuery.of(context).size.width * 0.05, - right: MediaQuery.of(context).size.width * 0.05), - child: AppText(TranslationBase.of(context).episode, - fontSize: 3.5 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - ), - Container( - color: Theme.of(context).scaffoldBackgroundColor, - margin: EdgeInsets.only( - left: MediaQuery.of(context).size.width * 0.05, - right: MediaQuery.of(context).size.width * 0.05), - child: StepsWidget( - index: _currentIndex, - changeCurrentTab: changePageViewIndex, - height: 100,//MediaQuery.of(context).size.height * 0.17, - ), - ), Container( color: Theme.of(context).scaffoldBackgroundColor, - height: MediaQuery.of(context).size.height * 0.50, + height: MediaQuery.of(context).size.height * 0.73, child: PageView( physics: NeverScrollableScrollPhysics(), controller: _controller, @@ -138,22 +107,26 @@ class _UpdateSoapIndexState extends State children: [ UpdateSubjectivePage( changePageViewIndex: changePageViewIndex, + currentIndex: _currentIndex, myAllergiesList: myAllergiesList, myHistoryList: myHistoryList, patientInfo: patient, changeLoadingState: changeLoadingState), UpdateObjectivePage( changePageViewIndex: changePageViewIndex, + currentIndex: _currentIndex, mySelectedExamination: mySelectedExamination, patientInfo: patient, changeLoadingState: changeLoadingState), UpdateAssessmentPage( changePageViewIndex: changePageViewIndex, + currentIndex: _currentIndex, mySelectedAssessmentList: mySelectedAssessment, patientInfo: patient, changeLoadingState: changeLoadingState), UpdatePlanPage( changePageViewIndex: changePageViewIndex, + currentIndex: _currentIndex, patientInfo: patient, patientProgressNote: patientProgressNote, changeLoadingState: changeLoadingState) From 6db35c8de9c44ffca3d137481eaadd2726dc0e65 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 13 Apr 2021 14:50:10 +0300 Subject: [PATCH 4/5] return commented code --- lib/screens/dashboard_screen.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index b0c3bcde..13e17077 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -1020,12 +1020,12 @@ class _DashboardScreenState extends State { ), hasBorder: false, onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - SearchMedicinePatientScreen(), - )); + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => + // SearchMedicinePatientScreen(), + // )); }, ) ], From 440d714045b27c0f570e2f2842c009a27e4364b6 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 13 Apr 2021 14:54:19 +0300 Subject: [PATCH 5/5] bottom sheet fix --- .../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 68e02e2e..6306e069 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 @@ -321,11 +321,11 @@ class _UpdateSubjectivePageState extends State { decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all( - Radius.circular(10.0), + Radius.circular(0.0), ), border: Border.all( color: HexColor('#707070'), - width: 0.30), + width: 0), ), height: MediaQuery .of(context)