finish on history design

merge-requests/444/head
Elham Rababah 5 years ago
parent b70e41a558
commit 0d42163034

@ -517,7 +517,7 @@ const Map<String, Map<String, String>> localizedValues = {
'addHistory': {'en': "Add History", 'ar': "اضافه تاريخ مرضي"}, 'addHistory': {'en': "Add History", 'ar': "اضافه تاريخ مرضي"},
'searchHistory': {'en': "Search History", 'ar': " البحث"}, 'searchHistory': {'en': "Search History", 'ar': " البحث"},
'addSelectedHistories': { 'addSelectedHistories': {
'en': "add selected histories", 'en': "Add Selected Histories",
'ar': " اضافه تاريخ مرضي" 'ar': " اضافه تاريخ مرضي"
}, },
'addAllergies': {'en': "Add Allergies", 'ar': "أضف الحساسية"}, 'addAllergies': {'en': "Add Allergies", 'ar': "أضف الحساسية"},

@ -11,9 +11,10 @@ class ExpandableSOAPWidget extends StatelessWidget {
final Widget child; final Widget child;
final Function onTap; final Function onTap;
final headerTitle; final headerTitle;
final bool isRequired;
const ExpandableSOAPWidget( 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); : super(key: key);
@override @override
@ -40,6 +41,7 @@ class ExpandableSOAPWidget extends StatelessWidget {
// bold: isExpanded ? true : false, // bold: isExpanded ? true : false,
fontSize: 15, fontSize: 15,
color: Colors.black), color: Colors.black),
if(isRequired)
Icon( Icon(
FontAwesomeIcons.asterisk, FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor, color: AppGlobal.appPrimaryColor,

@ -115,9 +115,6 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
textDecoration: myHistory.isChecked textDecoration: myHistory.isChecked
? null ? null
: TextDecoration.lineThrough, : TextDecoration.lineThrough,
// bold: true, // bold: true,
color: HexColor("#B8382C"),), color: HexColor("#B8382C"),),
// width: MediaQuery.of(context).size.width * 0.3, // width: MediaQuery.of(context).size.width * 0.3,
@ -169,10 +166,13 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
openHistoryList(BuildContext context) { openHistoryList(BuildContext context) {
showModalBottomSheet( showModalBottomSheet(
backgroundColor: Colors.white, backgroundColor: Colors.white,
isDismissible: false,
isScrollControlled: true, isScrollControlled: true,
context: context, context: context,
builder: (context) { builder: (context) {
return AddHistoryDialog( return FractionallySizedBox(
heightFactor: 1,
child: AddHistoryDialog(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
controller: _controller, controller: _controller,
myHistoryList: widget.myHistoryList, myHistoryList: widget.myHistoryList,
@ -182,6 +182,7 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
}); });
}, },
removeHistory: (masterKey) => removeHistory(masterKey), removeHistory: (masterKey) => removeHistory(masterKey),
),
); );
}); });
} }

@ -263,6 +263,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
headerTitle: TranslationBase headerTitle: TranslationBase
.of(context) .of(context)
.histories, .histories,
isRequired: false,
onTap: () { onTap: () {
setState(() { setState(() {
isHistoryExpand = !isHistoryExpand; isHistoryExpand = !isHistoryExpand;
@ -285,6 +286,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
.of(context) .of(context)
.allergiesSoap .allergiesSoap
, ,
isRequired: false,
onTap: () { onTap: () {
setState(() { setState(() {
isAllergiesExpand = !isAllergiesExpand; isAllergiesExpand = !isAllergiesExpand;
@ -337,6 +339,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
title: TranslationBase title: TranslationBase
.of(context) .of(context)
.next, .next,
fontWeight: FontWeight.bold,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onPressed: () async { onPressed: () async {
addSubjectiveInfo( addSubjectiveInfo(

@ -75,7 +75,7 @@ class _AppButtonState extends State<AppButton> {
), ),
) )
: AppText( : AppText(
widget.title.toUpperCase(), widget.title,
color: widget.fontColor, color: widget.fontColor,
fontSize: SizeConfig.textMultiplier * widget.fontSize, fontSize: SizeConfig.textMultiplier * widget.fontSize,
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,

@ -54,11 +54,11 @@ class _MasterKeyCheckboxSearchWidgetState extends State<MasterKeyCheckboxSearchW
return Container( return Container(
child: Column( child: Column(
children: [ children: [
Container( Expanded(
child: Container(
height: MediaQuery.of(context).size.height * 0.62, height: MediaQuery.of(context).size.height * 0.62,
child: Center( child: Center(
child: Container( child: Container(
padding:EdgeInsets.all(20),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
color: Colors.white), color: Colors.white),
@ -68,13 +68,19 @@ class _MasterKeyCheckboxSearchWidgetState extends State<MasterKeyCheckboxSearchW
hintText: widget.hintSearchText ?? TranslationBase hintText: widget.hintSearchText ?? TranslationBase
.of(context) .of(context)
.searchHistory, .searchHistory,
borderWidth: 0.0,
padding: EdgeInsets.all(20),
borderRadius: 0,
suffixIcon: EvaIcons.search, suffixIcon: EvaIcons.search,
onChanged: (value) { onChanged: (value) {
filterSearchResults(value); filterSearchResults(value);
}, },
), ),
SizedBox(height: 15,), // SizedBox(height: 15,),
Column( DividerWithSpacesAround(),
Container(
// padding:EdgeInsets.all(20),
child: Column(
children: items.map((historyInfo) { children: items.map((historyInfo) {
return Column( return Column(
children: [ children: [
@ -114,17 +120,20 @@ class _MasterKeyCheckboxSearchWidgetState extends State<MasterKeyCheckboxSearchW
); );
}).toList(), }).toList(),
), ),
),
], ],
), ),
)), )),
), ),
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
if (widget.model.state == ViewState.Idle) if (widget.model.state == ViewState.Idle)
AppButton( AppButton(
title: widget.buttonName?? TranslationBase.of(context).addSelectedHistories.toUpperCase(), title: widget.buttonName?? TranslationBase.of(context).addSelectedHistories,
padding: 10, padding: 10,
color: Color(0xFF359846),
onPressed: () { onPressed: () {
widget.addSelectedHistories(); widget.addSelectedHistories();
}, },

Loading…
Cancel
Save