From 0d4216303474aca75f9d24824cbdfbf1c598e8ec Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Wed, 7 Apr 2021 11:12:54 +0300 Subject: [PATCH] finish on history design --- lib/config/localized_values.dart | 2 +- .../soap_update/expandable_SOAP_widget.dart | 4 +- .../subjective/update_history_widget.dart | 27 ++-- .../subjective/update_subjective_page.dart | 3 + lib/widgets/shared/app_buttons_widget.dart | 2 +- .../master_key_checkbox_search_widget.dart | 129 ++++++++++-------- 6 files changed, 91 insertions(+), 76 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 31487256..c886c499 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -517,7 +517,7 @@ const Map> localizedValues = { 'addHistory': {'en': "Add History", 'ar': "اضافه تاريخ مرضي"}, 'searchHistory': {'en': "Search History", 'ar': " البحث"}, 'addSelectedHistories': { - 'en': "add selected histories", + 'en': "Add Selected Histories", 'ar': " اضافه تاريخ مرضي" }, 'addAllergies': {'en': "Add Allergies", 'ar': "أضف الحساسية"}, 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 5a0bcd8e..32876539 100644 --- a/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart +++ b/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart @@ -11,9 +11,10 @@ class ExpandableSOAPWidget extends StatelessWidget { final Widget child; final Function onTap; final headerTitle; + final bool isRequired; const ExpandableSOAPWidget( - {Key key, this.isExpanded, this.child, this.onTap, this.headerTitle}) + {Key key, this.isExpanded, this.child, this.onTap, this.headerTitle, this.isRequired= true}) : super(key: key); @override @@ -40,6 +41,7 @@ class ExpandableSOAPWidget extends StatelessWidget { // bold: isExpanded ? true : false, fontSize: 15, color: Colors.black), + if(isRequired) Icon( FontAwesomeIcons.asterisk, color: AppGlobal.appPrimaryColor, diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_history_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_history_widget.dart index 92a41d8a..eb69e7a5 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_history_widget.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_history_widget.dart @@ -115,9 +115,6 @@ class _UpdateHistoryWidgetState extends State textDecoration: myHistory.isChecked ? null : TextDecoration.lineThrough, - - - // bold: true, color: HexColor("#B8382C"),), // width: MediaQuery.of(context).size.width * 0.3, @@ -169,19 +166,23 @@ class _UpdateHistoryWidgetState extends State openHistoryList(BuildContext context) { showModalBottomSheet( backgroundColor: Colors.white, + isDismissible: false, isScrollControlled: true, context: context, builder: (context) { - return AddHistoryDialog( - changePageViewIndex: changePageViewIndex, - controller: _controller, - myHistoryList: widget.myHistoryList, - addSelectedHistories: () { - setState(() { - Navigator.of(context).pop(); - }); - }, - removeHistory: (masterKey) => removeHistory(masterKey), + return FractionallySizedBox( + heightFactor: 1, + child: AddHistoryDialog( + changePageViewIndex: changePageViewIndex, + controller: _controller, + myHistoryList: widget.myHistoryList, + addSelectedHistories: () { + setState(() { + Navigator.of(context).pop(); + }); + }, + removeHistory: (masterKey) => removeHistory(masterKey), + ), ); }); } 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 c3a43648..45202baf 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 @@ -263,6 +263,7 @@ class _UpdateSubjectivePageState extends State { headerTitle: TranslationBase .of(context) .histories, + isRequired: false, onTap: () { setState(() { isHistoryExpand = !isHistoryExpand; @@ -285,6 +286,7 @@ class _UpdateSubjectivePageState extends State { .of(context) .allergiesSoap , + isRequired: false, onTap: () { setState(() { isAllergiesExpand = !isAllergiesExpand; @@ -337,6 +339,7 @@ class _UpdateSubjectivePageState extends State { title: TranslationBase .of(context) .next, + fontWeight: FontWeight.bold, loading: model.state == ViewState.BusyLocal, onPressed: () async { addSubjectiveInfo( diff --git a/lib/widgets/shared/app_buttons_widget.dart b/lib/widgets/shared/app_buttons_widget.dart index 165e1680..024f3db7 100644 --- a/lib/widgets/shared/app_buttons_widget.dart +++ b/lib/widgets/shared/app_buttons_widget.dart @@ -75,7 +75,7 @@ class _AppButtonState extends State { ), ) : AppText( - widget.title.toUpperCase(), + widget.title, color: widget.fontColor, fontSize: SizeConfig.textMultiplier * widget.fontSize, fontWeight: widget.fontWeight, diff --git a/lib/widgets/shared/master_key_checkbox_search_widget.dart b/lib/widgets/shared/master_key_checkbox_search_widget.dart index 64853f0a..b5376246 100644 --- a/lib/widgets/shared/master_key_checkbox_search_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_widget.dart @@ -54,77 +54,86 @@ class _MasterKeyCheckboxSearchWidgetState extends State