From 5caa2da6f3ded0fc961b8b3426ec5fa08a7d5101 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Wed, 14 Apr 2021 13:21:19 +0300 Subject: [PATCH] fix issue on soap design --- .../soap_update/expandable_SOAP_widget.dart | 50 +- .../objective/update_objective_page.dart | 27 - .../soap_update/update_assessment_page.dart | 1061 +++++++++++------ .../profile/soap_update/update_plan_page.dart | 4 +- .../soap_update/update_soap_index.dart | 2 +- ..._key_checkbox_search_allergies_widget.dart | 19 +- .../master_key_checkbox_search_widget.dart | 33 +- 7 files changed, 738 insertions(+), 458 deletions(-) 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 796a6c37..a55662ce 100644 --- a/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart +++ b/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart @@ -31,29 +31,35 @@ class ExpandableSOAPWidget extends StatelessWidget { width: 0.30), ), child: HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - InkWell( - onTap: onTap, - child: Row( - children: [ - Texts(headerTitle, - variant: isExpanded ? "bodyText" : '', - // bold: isExpanded ? true : false, - fontSize: 15, - color: Colors.black), - if(isRequired) - Icon( - FontAwesomeIcons.asterisk, - size: 12, - ) - ], + headerWidget: InkWell( + onTap: onTap, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + InkWell( + onTap: onTap, + child: Row( + children: [ + Texts(headerTitle, + variant: isExpanded ? "bodyText" : '', + // bold: isExpanded ? true : false, + fontSize: 15, + color: Colors.black), + if(isRequired) + Icon( + FontAwesomeIcons.asterisk, + size: 12, + ) + ], + ), ), - ), - Icon( - isExpanded ? EvaIcons.arrowIosUpwardOutline: EvaIcons.arrowIosDownwardOutline) - ], + InkWell( + onTap: onTap, + child: Icon( + isExpanded ? EvaIcons.arrowIosUpwardOutline: EvaIcons.arrowIosDownwardOutline), + ) + ], + ), ), bodyWidget: child, isExpand: isExpanded, 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 ce0f6064..390b7cdd 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 @@ -461,33 +461,6 @@ class _AddExaminationDailogState extends State { SizedBox( height: 16, ), - /*MasterKeyCheckboxSearchWidget( - model: model, - hintSearchText: - TranslationBase.of(context).searchExamination, - buttonName: - TranslationBase.of(context).addExamination, - masterList: model.physicalExaminationList, - removeHistory: (history) { - setState(() { - widget.removeExamination(history); - }); - }, - addHistory: (history) { - setState(() { - MySelectedExamination mySelectedExamination = - new MySelectedExamination( - selectedExamination: history); - widget.mySelectedExamination - .add(mySelectedExamination); - }); - }, - addSelectedHistories: () { - widget.addSelectedExamination(); - }, - isServiceSelected: (master) => - isServiceSelected(master), - ),*/ ]), ))), )), 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 475596d4..14279b6e 100644 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart @@ -27,10 +27,12 @@ import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body. import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; 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 'custom_validation_error.dart'; +import 'expandable_SOAP_widget.dart'; class UpdateAssessmentPage extends StatefulWidget { final Function changePageViewIndex; @@ -113,11 +115,17 @@ class _UpdateAssessmentPageState extends State { }, builder: (_, model, w) => AppScaffold( isShowAppBar: false, + backgroundColor: Theme + .of(context) + .scaffoldBackgroundColor, // baseViewModel: model, body: SingleChildScrollView( physics: ScrollPhysics(), child: Container( - color: Color(0xffF8F8F8), + + color: Theme + .of(context) + .scaffoldBackgroundColor, child: Center( child: FractionallySizedBox( widthFactor: 0.9, @@ -125,386 +133,651 @@ class _UpdateAssessmentPageState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex), - Container( - width: double.infinity, - margin: EdgeInsets.only(top: 10, left: 10, right: 10), - padding: EdgeInsets.all(8.0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(10.0), + + ExpandableSOAPWidget( + headerTitle: TranslationBase.of(context).assessment + , + onTap: () { + setState(() { + isAssessmentExpand = !isAssessmentExpand; + }); + }, + child: Column(children: [ + SizedBox( + height: 20, ), - border: Border.all(color: Colors.grey[200], width: 0.5), - ), - child: HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + Column( children: [ - Padding( - padding: EdgeInsets.all(12.0), - child: Row( - children: [ - Texts(TranslationBase.of(context).assessment, - variant: - isAssessmentExpand ? "bodyText" : '', - bold: isAssessmentExpand ? true : false, - color: Colors.black), - Icon( - FontAwesomeIcons.asterisk, - color: Colors.black, - size: 10, - ) - ], - ), + Container( + margin: + EdgeInsets.only(left: 5, right: 5, top: 15), + child: TextFields( + hintText: TranslationBase.of(context) + .addAssessment, + fontSize: 13.5, + onTapTextFields: () { + openAssessmentDialog(context, + isUpdate: false, model: model); + }, + readOnly: true, + suffixIcon: EvaIcons.plusSquare, + suffixIconColor: Colors.black, + fontWeight: FontWeight.w600, + validator: (value) { + if (value == null) + return TranslationBase.of(context) + .emptyMessage; + else + return null; + }), ), - InkWell( - onTap: () { - setState(() { - isAssessmentExpand = !isAssessmentExpand; - }); - }, - child: Icon(isAssessmentExpand - ? EvaIcons.arrowUp - : EvaIcons.arrowDown)) - ], - ), - bodyWidget: Column(children: [ - SizedBox( - height: 20, - ), - Column( - children: [ - Container( - margin: - EdgeInsets.only(left: 5, right: 5, top: 15), - child: TextFields( - hintText: TranslationBase.of(context) - .addAssessment, - fontSize: 13.5, - onTapTextFields: () { - openAssessmentDialog(context, - isUpdate: false, model: model); - }, - readOnly: true, - suffixIcon: EvaIcons.plusSquare, - suffixIconColor: Colors.black, - fontWeight: FontWeight.w600, - validator: (value) { - if (value == null) - return TranslationBase.of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - Column( - children: widget.mySelectedAssessmentList - .map((assessment) { - return Container( - margin: EdgeInsets.only( - left: 5, right: 5, top: 15), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - AppText( - "ICD : ".toUpperCase(), - fontSize: 10, - color: Colors.grey, - ), - Container( - child: AppText( - assessment.selectedICD.code - .trim() - .toUpperCase() ?? - "", - fontWeight: FontWeight.w700, - fontSize: 11, - ), - ), - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .ICDName + - " : ", - fontSize: 13, - color: Colors.grey, - ), - Container( - width: MediaQuery.of(context) - .size - .width * - 0.29, - child: AppText( - assessment - .selectedICD.description - .toString(), - fontWeight: FontWeight.w700, - fontSize: 10, - ), - ), - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .appointmentNo, - fontSize: 10, - color: Colors.grey, + SizedBox( + height: 20, + ), + Column( + children: widget.mySelectedAssessmentList + .map((assessment) { + return Container( + margin: EdgeInsets.only( + left: 5, right: 5, top: 15), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText( + "ICD : ".toUpperCase(), + fontSize: 10, + color: Colors.grey, + ), + Container( + child: AppText( + assessment.selectedICD.code + .trim() + .toUpperCase() ?? + "", + fontWeight: FontWeight.w700, + fontSize: 11, ), - AppText( - assessment.appointmentId + ), + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .ICDName + + " : ", + fontSize: 13, + color: Colors.grey, + ), + Container( + width: MediaQuery.of(context) + .size + .width * + 0.29, + child: AppText( + assessment + .selectedICD.description .toString(), - fontSize: 11, fontWeight: FontWeight.w700, + fontSize: 10, ), - ], - ), + ), + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .appointmentNo, + fontSize: 10, + color: Colors.grey, + ), + AppText( + assessment.appointmentId + .toString(), + fontSize: 11, + fontWeight: FontWeight.w700, + ), + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .condition + + " : ", + fontSize: 10, + color: Colors.grey, + ), + AppText( + projectViewModel.isArabic + ? assessment + .selectedDiagnosisCondition + .nameAr + : assessment + .selectedDiagnosisCondition + .nameEn, + fontSize: 11, + fontWeight: FontWeight.w700, + ), + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .dType + + ' : ', + fontSize: 10, + color: Colors.grey, + ), + AppText( + projectViewModel.isArabic + ? assessment + .selectedDiagnosisType + .nameAr + : assessment + .selectedDiagnosisType + .nameEn, + fontSize: 11, + fontWeight: FontWeight.w700, + ), + ], + ), + if (assessment.doctorName != null) Row( mainAxisAlignment: - MainAxisAlignment.start, + MainAxisAlignment.start, children: [ AppText( TranslationBase.of(context) - .condition + - " : ", + .doc, fontSize: 10, color: Colors.grey, ), AppText( - projectViewModel.isArabic - ? assessment - .selectedDiagnosisCondition - .nameAr - : assessment - .selectedDiagnosisCondition - .nameEn, + assessment.doctorName ?? '', fontSize: 11, fontWeight: FontWeight.w700, ), ], ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .dType + - ' : ', - fontSize: 10, - color: Colors.grey, - ), - AppText( - projectViewModel.isArabic - ? assessment - .selectedDiagnosisType - .nameAr - : assessment - .selectedDiagnosisType - .nameEn, + SizedBox( + height: 6, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + SizedBox( + height: 6, + ), + AppText( + assessment.remark != null || + assessment.remark == + '' + ? TranslationBase.of( + context) + .remarks + + " : " + : '', + fontSize: 10, + color: Colors.grey, + ), + Container( + width: MediaQuery.of(context) + .size + .width * + 0.38, + child: AppText( + assessment.remark ?? "", fontSize: 11, fontWeight: FontWeight.w700, ), - ], - ), - if (assessment.doctorName != null) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .doc, - fontSize: 10, - color: Colors.grey, - ), - AppText( - assessment.doctorName ?? '', - fontSize: 11, - fontWeight: FontWeight.w700, - ), - ], ), - SizedBox( - height: 6, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - SizedBox( - height: 6, - ), - AppText( - assessment.remark != null || - assessment.remark == - '' - ? TranslationBase.of( - context) - .remarks + - " : " - : '', - fontSize: 10, - color: Colors.grey, - ), - Container( - width: MediaQuery.of(context) - .size - .width * - 0.38, - child: AppText( - assessment.remark ?? "", - fontSize: 11, - fontWeight: FontWeight.w700, - ), - ), - ], - ), - ], - ), - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - AppText( - assessment.createdOn != null - ? DateTime.parse( - assessment - .createdOn) - .day - .toString() - : DateTime.now() - .day - .toString(), - fontWeight: FontWeight.bold, - fontSize: 15, - ), - AppText(" "), - AppText( - Helpers.getMonth(assessment - .createdOn != - null - ? DateTime.parse( - assessment - .createdOn) - .month - : DateTime.now() - .month) - .toUpperCase(), - fontSize: 13, - color: Colors.grey, - ), - ], - ), - SizedBox( - height: MediaQuery.of(context) - .size - .height * - 0.05, - ), - InkWell( - onTap: () { - openAssessmentDialog(context, - isUpdate: true, - assessment: assessment, - model: model); - }, - child: Icon(EvaIcons.edit2), - ) - ], - ), - // Column( - // children: [ - // // SizedBox( - // // height: 60, - // // ), - // InkWell( - // onTap: () { - // openAssessmentDialog( - // context, - // isUpdate: true, - // assessment: assessment, - // model: model); - // }, - // child: Icon(EvaIcons.edit2), - // ) - // ], - // ), - ], - ), - ); - }).toList(), - ) - ], - ) - ]), - isExpand: isAssessmentExpand, - ), - ), - DividerWithSpacesAround( - height: 30, + ], + ), + ], + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText( + assessment.createdOn != null + ? DateTime.parse( + assessment + .createdOn) + .day + .toString() + : DateTime.now() + .day + .toString(), + fontWeight: FontWeight.bold, + fontSize: 15, + ), + AppText(" "), + AppText( + Helpers.getMonth(assessment + .createdOn != + null + ? DateTime.parse( + assessment + .createdOn) + .month + : DateTime.now() + .month) + .toUpperCase(), + fontSize: 13, + color: Colors.grey, + ), + ], + ), + SizedBox( + height: MediaQuery.of(context) + .size + .height * + 0.05, + ), + InkWell( + onTap: () { + openAssessmentDialog(context, + isUpdate: true, + assessment: assessment, + model: model); + }, + child: Icon(EvaIcons.edit2), + ) + ], + ), + // Column( + // children: [ + // // SizedBox( + // // height: 60, + // // ), + // InkWell( + // onTap: () { + // openAssessmentDialog( + // context, + // isUpdate: true, + // assessment: assessment, + // model: model); + // }, + // child: Icon(EvaIcons.edit2), + // ) + // ], + // ), + ], + ), + ); + }).toList(), + ) + ], + ) + ]), + isExpanded: isAssessmentExpand, ), - // Row( - // children: [ - // Container( - // width: MediaQuery.of(context).size.width * 0.4, - // child: AppButton( - // title: 'Previous', - // color: Colors.white38, - // fontColor: Colors.black, - // fontWeight: FontWeight.w700, - // loading: model.state == ViewState.BusyLocal, - // onPressed: () async { - // Navigator.pop(context); - // }, - // ), + + // Container( + // width: double.infinity, + // margin: EdgeInsets.only(top: 10, left: 10, right: 10), + // padding: EdgeInsets.all(8.0), + // decoration: BoxDecoration( + // color: Colors.white, + // borderRadius: BorderRadius.all( + // Radius.circular(10.0), // ), - // SizedBox( - // width: MediaQuery.of(context).size.width * 0.05, + // border: Border.all(color: Colors.grey[200], width: 0.5), + // ), + // child: HeaderBodyExpandableNotifier( + // headerWidget: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Padding( + // padding: EdgeInsets.all(12.0), + // child: Row( + // children: [ + // Texts(TranslationBase.of(context).assessment, + // variant: + // isAssessmentExpand ? "bodyText" : '', + // bold: isAssessmentExpand ? true : false, + // color: Colors.black), + // Icon( + // FontAwesomeIcons.asterisk, + // color: Colors.black, + // size: 10, + // ) + // ], + // ), + // ), + // InkWell( + // onTap: () { + // setState(() { + // isAssessmentExpand = !isAssessmentExpand; + // }); + // }, + // child: Icon(isAssessmentExpand + // ? EvaIcons.arrowUp + // : EvaIcons.arrowDown)) + // ], // ), - // Container( - // width: MediaQuery.of(context).size.width * 0.4, - // child: AppButton( - // title: TranslationBase.of(context).next, - // fontWeight: FontWeight.w700, - // loading: model.state == ViewState.BusyLocal, - // onPressed: () async { - // if (widget.mySelectedAssessmentList.isEmpty) { - // helpers.showErrorToast( - // TranslationBase.of(context) - // .assessmentErrorMsg); - // } else { - // widget.changePageViewIndex(3); - // widget.changeLoadingState(true); - // } - // }, + // bodyWidget: Column(children: [ + // SizedBox( + // height: 20, // ), - // ), - // ], + // Column( + // children: [ + // Container( + // margin: + // EdgeInsets.only(left: 5, right: 5, top: 15), + // child: TextFields( + // hintText: TranslationBase.of(context) + // .addAssessment, + // fontSize: 13.5, + // onTapTextFields: () { + // openAssessmentDialog(context, + // isUpdate: false, model: model); + // }, + // readOnly: true, + // suffixIcon: EvaIcons.plusSquare, + // suffixIconColor: Colors.black, + // fontWeight: FontWeight.w600, + // validator: (value) { + // if (value == null) + // return TranslationBase.of(context) + // .emptyMessage; + // else + // return null; + // }), + // ), + // SizedBox( + // height: 20, + // ), + // Column( + // children: widget.mySelectedAssessmentList + // .map((assessment) { + // return Container( + // margin: EdgeInsets.only( + // left: 5, right: 5, top: 15), + // child: Row( + // mainAxisAlignment: + // MainAxisAlignment.spaceBetween, + // crossAxisAlignment: + // CrossAxisAlignment.start, + // children: [ + // Column( + // crossAxisAlignment: + // CrossAxisAlignment.start, + // children: [ + // Row( + // children: [ + // AppText( + // "ICD : ".toUpperCase(), + // fontSize: 10, + // color: Colors.grey, + // ), + // Container( + // child: AppText( + // assessment.selectedICD.code + // .trim() + // .toUpperCase() ?? + // "", + // fontWeight: FontWeight.w700, + // fontSize: 11, + // ), + // ), + // ], + // ), + // Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // crossAxisAlignment: + // CrossAxisAlignment.start, + // children: [ + // AppText( + // TranslationBase.of(context) + // .ICDName + + // " : ", + // fontSize: 13, + // color: Colors.grey, + // ), + // Container( + // width: MediaQuery.of(context) + // .size + // .width * + // 0.29, + // child: AppText( + // assessment + // .selectedICD.description + // .toString(), + // fontWeight: FontWeight.w700, + // fontSize: 10, + // ), + // ), + // ], + // ), + // Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // children: [ + // AppText( + // TranslationBase.of(context) + // .appointmentNo, + // fontSize: 10, + // color: Colors.grey, + // ), + // AppText( + // assessment.appointmentId + // .toString(), + // fontSize: 11, + // fontWeight: FontWeight.w700, + // ), + // ], + // ), + // Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // children: [ + // AppText( + // TranslationBase.of(context) + // .condition + + // " : ", + // fontSize: 10, + // color: Colors.grey, + // ), + // AppText( + // projectViewModel.isArabic + // ? assessment + // .selectedDiagnosisCondition + // .nameAr + // : assessment + // .selectedDiagnosisCondition + // .nameEn, + // fontSize: 11, + // fontWeight: FontWeight.w700, + // ), + // ], + // ), + // Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // children: [ + // AppText( + // TranslationBase.of(context) + // .dType + + // ' : ', + // fontSize: 10, + // color: Colors.grey, + // ), + // AppText( + // projectViewModel.isArabic + // ? assessment + // .selectedDiagnosisType + // .nameAr + // : assessment + // .selectedDiagnosisType + // .nameEn, + // fontSize: 11, + // fontWeight: FontWeight.w700, + // ), + // ], + // ), + // if (assessment.doctorName != null) + // Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // children: [ + // AppText( + // TranslationBase.of(context) + // .doc, + // fontSize: 10, + // color: Colors.grey, + // ), + // AppText( + // assessment.doctorName ?? '', + // fontSize: 11, + // fontWeight: FontWeight.w700, + // ), + // ], + // ), + // SizedBox( + // height: 6, + // ), + // Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // children: [ + // SizedBox( + // height: 6, + // ), + // AppText( + // assessment.remark != null || + // assessment.remark == + // '' + // ? TranslationBase.of( + // context) + // .remarks + + // " : " + // : '', + // fontSize: 10, + // color: Colors.grey, + // ), + // Container( + // width: MediaQuery.of(context) + // .size + // .width * + // 0.38, + // child: AppText( + // assessment.remark ?? "", + // fontSize: 11, + // fontWeight: FontWeight.w700, + // ), + // ), + // ], + // ), + // ], + // ), + // Column( + // crossAxisAlignment: + // CrossAxisAlignment.start, + // children: [ + // Row( + // children: [ + // AppText( + // assessment.createdOn != null + // ? DateTime.parse( + // assessment + // .createdOn) + // .day + // .toString() + // : DateTime.now() + // .day + // .toString(), + // fontWeight: FontWeight.bold, + // fontSize: 15, + // ), + // AppText(" "), + // AppText( + // Helpers.getMonth(assessment + // .createdOn != + // null + // ? DateTime.parse( + // assessment + // .createdOn) + // .month + // : DateTime.now() + // .month) + // .toUpperCase(), + // fontSize: 13, + // color: Colors.grey, + // ), + // ], + // ), + // SizedBox( + // height: MediaQuery.of(context) + // .size + // .height * + // 0.05, + // ), + // InkWell( + // onTap: () { + // openAssessmentDialog(context, + // isUpdate: true, + // assessment: assessment, + // model: model); + // }, + // child: Icon(EvaIcons.edit2), + // ) + // ], + // ), + // // Column( + // // children: [ + // // // SizedBox( + // // // height: 60, + // // // ), + // // InkWell( + // // onTap: () { + // // openAssessmentDialog( + // // context, + // // isUpdate: true, + // // assessment: assessment, + // // model: model); + // // }, + // // child: Icon(EvaIcons.edit2), + // // ) + // // ], + // // ), + // ], + // ), + // ); + // }).toList(), + // ) + // ], + // ) + // ]), + // isExpand: isAssessmentExpand, + // ), // ), SizedBox( height: 130, @@ -515,45 +788,55 @@ class _UpdateAssessmentPageState extends State { ), ), ), - bottomSheet: Padding( - padding: const EdgeInsets.all(12.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - width: MediaQuery.of(context).size.width * 0.4, - child: AppButton( - title: 'Previous', - color: Colors.white38, - fontColor: Colors.black, - fontWeight: FontWeight.w700, - loading: model.state == ViewState.BusyLocal, - onPressed: () async { - widget.changePageViewIndex(1); - }, + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all( + color: HexColor('#707070'), + width: 0), + ), child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.4, + child: AppButton( + title: 'Previous', + color: Colors.white38, + fontColor: Colors.black, + fontWeight: FontWeight.w700, + loading: model.state == ViewState.BusyLocal, + onPressed: () async { + widget.changePageViewIndex(1); + }, + ), ), - ), - SizedBox( - width: MediaQuery.of(context).size.width * 0.05, - ), - Container( - width: MediaQuery.of(context).size.width * 0.4, - child: AppButton( - title: TranslationBase.of(context).next, - fontWeight: FontWeight.w700, - loading: model.state == ViewState.BusyLocal, - onPressed: () async { - if (widget.mySelectedAssessmentList.isEmpty) { - helpers.showErrorToast( - TranslationBase.of(context).assessmentErrorMsg); - } else { - widget.changePageViewIndex(3); - widget.changeLoadingState(true); - } - }, + SizedBox( + width: MediaQuery.of(context).size.width * 0.05, ), - ), - ], + Container( + width: MediaQuery.of(context).size.width * 0.4, + child: AppButton( + title: TranslationBase.of(context).next, + fontWeight: FontWeight.w700, + loading: model.state == ViewState.BusyLocal, + onPressed: () async { + if (widget.mySelectedAssessmentList.isEmpty) { + helpers.showErrorToast( + TranslationBase.of(context).assessmentErrorMsg); + } else { + widget.changePageViewIndex(3); + widget.changeLoadingState(true); + } + }, + ), + ), + ], + ), ), ), ), 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 ad6390ea..999f7e69 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -101,7 +101,9 @@ class _UpdatePlanPageState extends State { }, builder: (_, model, w) => AppScaffold( // baseViewModel: model, - backgroundColor: Colors.grey[200], + backgroundColor: Theme + .of(context) + .scaffoldBackgroundColor, isShowAppBar: false, body: SingleChildScrollView( physics: ScrollPhysics(), 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 07f1aef5..78ceaec5 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -89,7 +89,7 @@ class _UpdateSoapIndexState extends State crossAxisAlignment: CrossAxisAlignment.start, children: [ // PatientPageHeaderWidget(patient), - PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,), + PatientProfileHeaderNewDesign(patient, '7', '7',), Container( width: double.infinity, height: 1, diff --git a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart index d644eda3..13b065b0 100644 --- a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart @@ -16,6 +16,7 @@ import 'package:provider/provider.dart'; import 'app-textfield-custom.dart'; import 'app_texts_widget.dart'; import 'dialogs/master_key_dailog.dart'; +import 'divider_with_spaces_around.dart'; import 'expandable-widget-header-body.dart'; class MasterKeyCheckboxSearchAllergiesWidget extends StatefulWidget { @@ -77,17 +78,21 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState color: Colors.white), child: Column( children: [ - TextFields( - hintText: widget.hintSearchText ?? - TranslationBase.of(context).selectAllergy, - borderWidth: 0.0, - padding: EdgeInsets.all(20), - borderRadius: 0, - suffixIcon: EvaIcons.search, + AppTextFieldCustom( + height: MediaQuery.of(context).size.height * 0.070, + hintText: TranslationBase.of(context).selectAllergy, + isDropDown: true, + hasBorder: false, + // controller: filteredSearchController, onChanged: (value) { filterSearchResults(value); }, + suffixIcon: Icon( + Icons.search, + color: Colors.black, + ), ), + DividerWithSpacesAround(), SizedBox( height: 10, ), diff --git a/lib/widgets/shared/master_key_checkbox_search_widget.dart b/lib/widgets/shared/master_key_checkbox_search_widget.dart index abe383e3..1b44a016 100644 --- a/lib/widgets/shared/master_key_checkbox_search_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_widget.dart @@ -3,16 +3,15 @@ import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.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_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; -import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'app-textfield-custom.dart'; import 'app_texts_widget.dart'; class MasterKeyCheckboxSearchWidget extends StatefulWidget { @@ -56,7 +55,16 @@ class _MasterKeyCheckboxSearchWidgetState extends State