fix small bug in allergies

merge-requests/484/head
Elham Rababah 5 years ago
parent e668fd3334
commit 6a6087e5ba

@ -242,11 +242,11 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
}); });
if (isAllDataFilled) { if (isAllDataFilled) {
mySelectedAllergy.forEach((element) { mySelectedAllergy.forEach((element) {
if (!widget.myAllergiesList.contains(element)) { if (!widget.myAllergiesList.contains(element.selectedAllergySeverity.id)) {
widget.myAllergiesList.add(element); widget.myAllergiesList.add(element);
} }
}); });
// changeParentState(); changeParentState();
Navigator.of(context).pop(); Navigator.of(context).pop();
} else { } else {
helpers.showErrorToast(TranslationBase helpers.showErrorToast(TranslationBase

@ -240,7 +240,11 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
.arrowIosDownwardOutline)) .arrowIosDownwardOutline))
], ],
), ),
bodyWidget: Column( bodyWidget: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Center(
child: Column(
children: [ children: [
AppTextFieldCustom( AppTextFieldCustom(
onClick: widget.model onClick: widget.model
@ -340,6 +344,9 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
height: 10, height: 10,
), ),
],), ],),
),
),
),
isExpand: mySelectedAllergy != null isExpand: mySelectedAllergy != null
? mySelectedAllergy.isExpanded ? mySelectedAllergy.isExpanded
: false, : false,

Loading…
Cancel
Save