finish on history design

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

@ -517,7 +517,7 @@ const Map<String, Map<String, String>> 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': "أضف الحساسية"},

@ -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,

@ -115,9 +115,6 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
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<UpdateHistoryWidget>
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),
),
);
});
}

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

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

@ -54,77 +54,86 @@ class _MasterKeyCheckboxSearchWidgetState extends State<MasterKeyCheckboxSearchW
return Container(
child: Column(
children: [
Container(
height: MediaQuery.of(context).size.height * 0.62,
child: Center(
child: Container(
padding:EdgeInsets.all(20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: ListView(
children: [
TextFields(
hintText: widget.hintSearchText ?? TranslationBase
.of(context)
.searchHistory,
suffixIcon: EvaIcons.search,
onChanged: (value) {
filterSearchResults(value);
},
),
SizedBox(height: 15,),
Column(
children: items.map((historyInfo) {
return Column(
children: [
Row(
Expanded(
child: Container(
height: MediaQuery.of(context).size.height * 0.62,
child: Center(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: ListView(
children: [
TextFields(
hintText: widget.hintSearchText ?? TranslationBase
.of(context)
.searchHistory,
borderWidth: 0.0,
padding: EdgeInsets.all(20),
borderRadius: 0,
suffixIcon: EvaIcons.search,
onChanged: (value) {
filterSearchResults(value);
},
),
// SizedBox(height: 15,),
DividerWithSpacesAround(),
Container(
// padding:EdgeInsets.all(20),
child: Column(
children: items.map((historyInfo) {
return Column(
children: [
Checkbox(
value:
widget.isServiceSelected(historyInfo),
activeColor: Colors.red[800],
onChanged: (bool newValue) {
setState(() {
if (widget
.isServiceSelected(historyInfo)) {
widget.removeHistory(historyInfo);
} else {
widget.addHistory(historyInfo);
}
});
}),
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 10, vertical: 0),
child: AppText(projectViewModel.isArabic
? historyInfo.nameAr!=""?historyInfo.nameAr:historyInfo.nameEn
: historyInfo.nameEn,
color: Color(0xFF575757),
fontSize: 16,
fontWeight:FontWeight.w600,
Row(
children: [
Checkbox(
value:
widget.isServiceSelected(historyInfo),
activeColor: Colors.red[800],
onChanged: (bool newValue) {
setState(() {
if (widget
.isServiceSelected(historyInfo)) {
widget.removeHistory(historyInfo);
} else {
widget.addHistory(historyInfo);
}
});
}),
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 10, vertical: 0),
child: AppText(projectViewModel.isArabic
? historyInfo.nameAr!=""?historyInfo.nameAr:historyInfo.nameEn
: historyInfo.nameEn,
color: Color(0xFF575757),
fontSize: 16,
fontWeight:FontWeight.w600,
),
),
),
),
],
),
// DividerWithSpacesAround(),
],
),
// DividerWithSpacesAround(),
],
);
}).toList(),
),
],
),
)),
);
}).toList(),
),
),
],
),
)),
),
),
SizedBox(
height: 10,
),
if (widget.model.state == ViewState.Idle)
AppButton(
title: widget.buttonName?? TranslationBase.of(context).addSelectedHistories.toUpperCase(),
title: widget.buttonName?? TranslationBase.of(context).addSelectedHistories,
padding: 10,
color: Color(0xFF359846),
onPressed: () {
widget.addSelectedHistories();
},

Loading…
Cancel
Save