|
|
|
@ -62,119 +62,91 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
return Container(
|
|
|
|
|
child: Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.70,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
AppTextFieldCustom(
|
|
|
|
|
// height:
|
|
|
|
|
// MediaQuery.of(context).size.height * 0.070,
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(context).selectAllergy,
|
|
|
|
|
isTextFieldHasSuffix: true,
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
// controller: filteredSearchController,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
filterSearchResults(value);
|
|
|
|
|
},
|
|
|
|
|
suffixIcon: IconButton(
|
|
|
|
|
icon: Icon(
|
|
|
|
|
Icons.search,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.9,
|
|
|
|
|
child: Container(
|
|
|
|
|
height:
|
|
|
|
|
MediaQuery.of(context).size.height * 0.60,
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
itemCount: items.length,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
bool isSelected = widget
|
|
|
|
|
.isServiceSelected(items[index]);
|
|
|
|
|
MySelectedAllergy mySelectedAllergy;
|
|
|
|
|
if (isSelected) {
|
|
|
|
|
mySelectedAllergy =
|
|
|
|
|
widget.getServiceSelectedAllergy(
|
|
|
|
|
items[index]);
|
|
|
|
|
}
|
|
|
|
|
TextEditingController remarkController =
|
|
|
|
|
TextEditingController(
|
|
|
|
|
text: isSelected
|
|
|
|
|
? mySelectedAllergy.remark
|
|
|
|
|
: null);
|
|
|
|
|
TextEditingController severityController =
|
|
|
|
|
TextEditingController(
|
|
|
|
|
text: isSelected
|
|
|
|
|
? mySelectedAllergy
|
|
|
|
|
.selectedAllergySeverity !=
|
|
|
|
|
null
|
|
|
|
|
? projectViewModel
|
|
|
|
|
.isArabic
|
|
|
|
|
? mySelectedAllergy
|
|
|
|
|
.selectedAllergySeverity
|
|
|
|
|
.nameAr
|
|
|
|
|
: mySelectedAllergy
|
|
|
|
|
.selectedAllergySeverity
|
|
|
|
|
.nameEn
|
|
|
|
|
: null
|
|
|
|
|
: null);
|
|
|
|
|
return HeaderBodyExpandableNotifier(
|
|
|
|
|
headerWidget: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: widget
|
|
|
|
|
.isServiceSelected(
|
|
|
|
|
items[index]),
|
|
|
|
|
activeColor:
|
|
|
|
|
Colors.red[800],
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (widget
|
|
|
|
|
.isServiceSelected(
|
|
|
|
|
items[index])) {
|
|
|
|
|
widget.removeAllergy(
|
|
|
|
|
items[index]);
|
|
|
|
|
} else {
|
|
|
|
|
MySelectedAllergy
|
|
|
|
|
mySelectedAllergy =
|
|
|
|
|
new MySelectedAllergy(
|
|
|
|
|
selectedAllergy:
|
|
|
|
|
items[
|
|
|
|
|
index],
|
|
|
|
|
selectedAllergySeverity:
|
|
|
|
|
_selectedAllergySeverity,
|
|
|
|
|
remark: null,
|
|
|
|
|
isChecked:
|
|
|
|
|
true,
|
|
|
|
|
isExpanded:
|
|
|
|
|
true);
|
|
|
|
|
widget.addAllergy(
|
|
|
|
|
mySelectedAllergy);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.70,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
AppTextFieldCustom(
|
|
|
|
|
// height:
|
|
|
|
|
// MediaQuery.of(context).size.height * 0.070,
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(context).selectAllergy,
|
|
|
|
|
isTextFieldHasSuffix: true,
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
// controller: filteredSearchController,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
filterSearchResults(value);
|
|
|
|
|
},
|
|
|
|
|
suffixIcon: IconButton(
|
|
|
|
|
icon: Icon(
|
|
|
|
|
Icons.search,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.9,
|
|
|
|
|
child: Container(
|
|
|
|
|
height:
|
|
|
|
|
MediaQuery.of(context).size.height * 0.60,
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
itemCount: items.length,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
bool isSelected = widget
|
|
|
|
|
.isServiceSelected(items[index]);
|
|
|
|
|
MySelectedAllergy mySelectedAllergy;
|
|
|
|
|
if (isSelected) {
|
|
|
|
|
mySelectedAllergy =
|
|
|
|
|
widget.getServiceSelectedAllergy(
|
|
|
|
|
items[index]);
|
|
|
|
|
}
|
|
|
|
|
TextEditingController remarkController =
|
|
|
|
|
TextEditingController(
|
|
|
|
|
text: isSelected
|
|
|
|
|
? mySelectedAllergy.remark
|
|
|
|
|
: null);
|
|
|
|
|
TextEditingController severityController =
|
|
|
|
|
TextEditingController(
|
|
|
|
|
text: isSelected
|
|
|
|
|
? mySelectedAllergy
|
|
|
|
|
.selectedAllergySeverity !=
|
|
|
|
|
null
|
|
|
|
|
? projectViewModel
|
|
|
|
|
.isArabic
|
|
|
|
|
? mySelectedAllergy
|
|
|
|
|
.selectedAllergySeverity
|
|
|
|
|
.nameAr
|
|
|
|
|
: mySelectedAllergy
|
|
|
|
|
.selectedAllergySeverity
|
|
|
|
|
.nameEn
|
|
|
|
|
: null
|
|
|
|
|
: null);
|
|
|
|
|
return HeaderBodyExpandableNotifier(
|
|
|
|
|
headerWidget: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: widget
|
|
|
|
|
.isServiceSelected(
|
|
|
|
|
items[index]),
|
|
|
|
|
activeColor:
|
|
|
|
|
Colors.red[800],
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (widget
|
|
|
|
|
.isServiceSelected(
|
|
|
|
@ -182,9 +154,8 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
|
|
|
|
|
widget.removeAllergy(
|
|
|
|
|
items[index]);
|
|
|
|
|
} else {
|
|
|
|
|
// TODO add Allergy
|
|
|
|
|
|
|
|
|
|
MySelectedAllergy mySelectedAllergy =
|
|
|
|
|
MySelectedAllergy
|
|
|
|
|
mySelectedAllergy =
|
|
|
|
|
new MySelectedAllergy(
|
|
|
|
|
selectedAllergy:
|
|
|
|
|
items[
|
|
|
|
@ -192,208 +163,234 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
|
|
|
|
|
selectedAllergySeverity:
|
|
|
|
|
_selectedAllergySeverity,
|
|
|
|
|
remark: null,
|
|
|
|
|
isChecked: true,
|
|
|
|
|
isChecked:
|
|
|
|
|
true,
|
|
|
|
|
isExpanded:
|
|
|
|
|
true);
|
|
|
|
|
widget.addAllergy(
|
|
|
|
|
mySelectedAllergy);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets
|
|
|
|
|
.symmetric(
|
|
|
|
|
horizontal: 10,
|
|
|
|
|
vertical: 0),
|
|
|
|
|
child: Container(
|
|
|
|
|
child: AppText(
|
|
|
|
|
projectViewModel
|
|
|
|
|
.isArabic
|
|
|
|
|
? items[index]
|
|
|
|
|
.nameAr !=
|
|
|
|
|
""
|
|
|
|
|
? items[index]
|
|
|
|
|
.nameAr
|
|
|
|
|
: items[index]
|
|
|
|
|
.nameEn
|
|
|
|
|
: items[index]
|
|
|
|
|
.nameEn,
|
|
|
|
|
color:
|
|
|
|
|
Color(0xFF575757),
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
width:
|
|
|
|
|
MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.width *
|
|
|
|
|
0.55,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
}),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
if (mySelectedAllergy !=
|
|
|
|
|
null) {
|
|
|
|
|
setState(() {
|
|
|
|
|
mySelectedAllergy
|
|
|
|
|
.isExpanded =
|
|
|
|
|
mySelectedAllergy
|
|
|
|
|
.isExpanded
|
|
|
|
|
? false
|
|
|
|
|
: true;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
setState(() {
|
|
|
|
|
if (widget
|
|
|
|
|
.isServiceSelected(
|
|
|
|
|
items[index])) {
|
|
|
|
|
widget.removeAllergy(
|
|
|
|
|
items[index]);
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
MySelectedAllergy mySelectedAllergy =
|
|
|
|
|
new MySelectedAllergy(
|
|
|
|
|
selectedAllergy:
|
|
|
|
|
items[
|
|
|
|
|
index],
|
|
|
|
|
selectedAllergySeverity:
|
|
|
|
|
_selectedAllergySeverity,
|
|
|
|
|
remark: null,
|
|
|
|
|
isChecked: true,
|
|
|
|
|
isExpanded:
|
|
|
|
|
true);
|
|
|
|
|
widget.addAllergy(
|
|
|
|
|
mySelectedAllergy);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Icon((mySelectedAllergy !=
|
|
|
|
|
null
|
|
|
|
|
? mySelectedAllergy
|
|
|
|
|
.isExpanded
|
|
|
|
|
: false)
|
|
|
|
|
? EvaIcons
|
|
|
|
|
.arrowIosUpwardOutline
|
|
|
|
|
: EvaIcons
|
|
|
|
|
.arrowIosDownwardOutline))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
bodyWidget: Center(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.9,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
AppTextFieldCustom(
|
|
|
|
|
onClick: widget.model
|
|
|
|
|
.allergySeverityList !=
|
|
|
|
|
null
|
|
|
|
|
? () {
|
|
|
|
|
MasterKeyDailog
|
|
|
|
|
dialog =
|
|
|
|
|
MasterKeyDailog(
|
|
|
|
|
list: widget.model
|
|
|
|
|
.allergySeverityList,
|
|
|
|
|
okText:
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.ok,
|
|
|
|
|
okFunction:
|
|
|
|
|
(selectedValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
mySelectedAllergy
|
|
|
|
|
.selectedAllergySeverity =
|
|
|
|
|
selectedValue;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
showDialog(
|
|
|
|
|
barrierDismissible:
|
|
|
|
|
false,
|
|
|
|
|
context: context,
|
|
|
|
|
builder:
|
|
|
|
|
(BuildContext
|
|
|
|
|
context) {
|
|
|
|
|
return dialog;
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
: null,
|
|
|
|
|
isTextFieldHasSuffix: true,
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.selectSeverity,
|
|
|
|
|
enabled: false,
|
|
|
|
|
maxLines: 2,
|
|
|
|
|
minLines: 2,
|
|
|
|
|
controller:
|
|
|
|
|
severityController,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
if (isSubmitted &&
|
|
|
|
|
mySelectedAllergy !=
|
|
|
|
|
null &&
|
|
|
|
|
mySelectedAllergy
|
|
|
|
|
.selectedAllergySeverity ==
|
|
|
|
|
null)
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
CustomValidationError(),
|
|
|
|
|
],
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.start,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets
|
|
|
|
|
.symmetric(
|
|
|
|
|
horizontal: 10,
|
|
|
|
|
vertical: 0),
|
|
|
|
|
child: Container(
|
|
|
|
|
child: AppText(
|
|
|
|
|
projectViewModel
|
|
|
|
|
.isArabic
|
|
|
|
|
? items[index]
|
|
|
|
|
.nameAr !=
|
|
|
|
|
""
|
|
|
|
|
? items[index]
|
|
|
|
|
.nameAr
|
|
|
|
|
: items[index]
|
|
|
|
|
.nameEn
|
|
|
|
|
: items[index]
|
|
|
|
|
.nameEn,
|
|
|
|
|
color:
|
|
|
|
|
Color(0xFF575757),
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 0,
|
|
|
|
|
right: 0,
|
|
|
|
|
top: 15),
|
|
|
|
|
child: NewTextFields(
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.remarks,
|
|
|
|
|
fontSize: 13.5,
|
|
|
|
|
// hintColor: Colors.black,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w600,
|
|
|
|
|
maxLines: 25,
|
|
|
|
|
minLines: 3,
|
|
|
|
|
initialValue: isSelected
|
|
|
|
|
? mySelectedAllergy
|
|
|
|
|
.remark
|
|
|
|
|
: '',
|
|
|
|
|
// controller: remarkControlle
|
|
|
|
|
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
if (isSelected) {
|
|
|
|
|
mySelectedAllergy
|
|
|
|
|
.remark = value;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
validator: (value) {
|
|
|
|
|
if (value == null)
|
|
|
|
|
return TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.emptyMessage;
|
|
|
|
|
else
|
|
|
|
|
return null;
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
width:
|
|
|
|
|
MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.width *
|
|
|
|
|
0.55,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
if (mySelectedAllergy !=
|
|
|
|
|
null) {
|
|
|
|
|
setState(() {
|
|
|
|
|
mySelectedAllergy
|
|
|
|
|
.isExpanded =
|
|
|
|
|
mySelectedAllergy
|
|
|
|
|
.isExpanded
|
|
|
|
|
? false
|
|
|
|
|
: true;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
child: Icon((mySelectedAllergy !=
|
|
|
|
|
null
|
|
|
|
|
? mySelectedAllergy
|
|
|
|
|
.isExpanded
|
|
|
|
|
: false)
|
|
|
|
|
? EvaIcons
|
|
|
|
|
.arrowIosUpwardOutline
|
|
|
|
|
: EvaIcons
|
|
|
|
|
.arrowIosDownwardOutline))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
bodyWidget: Center(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.9,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
AppTextFieldCustom(
|
|
|
|
|
onClick: widget.model
|
|
|
|
|
.allergySeverityList !=
|
|
|
|
|
null
|
|
|
|
|
? () {
|
|
|
|
|
MasterKeyDailog
|
|
|
|
|
dialog =
|
|
|
|
|
MasterKeyDailog(
|
|
|
|
|
list: widget.model
|
|
|
|
|
.allergySeverityList,
|
|
|
|
|
okText:
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.ok,
|
|
|
|
|
okFunction:
|
|
|
|
|
(selectedValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
mySelectedAllergy
|
|
|
|
|
.selectedAllergySeverity =
|
|
|
|
|
selectedValue;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
showDialog(
|
|
|
|
|
barrierDismissible:
|
|
|
|
|
false,
|
|
|
|
|
context: context,
|
|
|
|
|
builder:
|
|
|
|
|
(BuildContext
|
|
|
|
|
context) {
|
|
|
|
|
return dialog;
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
: null,
|
|
|
|
|
isTextFieldHasSuffix: true,
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.selectSeverity,
|
|
|
|
|
enabled: false,
|
|
|
|
|
maxLines: 2,
|
|
|
|
|
minLines: 2,
|
|
|
|
|
controller:
|
|
|
|
|
severityController,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
if (isSubmitted &&
|
|
|
|
|
mySelectedAllergy !=
|
|
|
|
|
null &&
|
|
|
|
|
mySelectedAllergy
|
|
|
|
|
.selectedAllergySeverity ==
|
|
|
|
|
null)
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
CustomValidationError(),
|
|
|
|
|
],
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.start,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 0,
|
|
|
|
|
right: 0,
|
|
|
|
|
top: 15),
|
|
|
|
|
child: NewTextFields(
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.remarks,
|
|
|
|
|
fontSize: 13.5,
|
|
|
|
|
// hintColor: Colors.black,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w600,
|
|
|
|
|
maxLines: 25,
|
|
|
|
|
minLines: 3,
|
|
|
|
|
initialValue: isSelected
|
|
|
|
|
? mySelectedAllergy
|
|
|
|
|
.remark
|
|
|
|
|
: '',
|
|
|
|
|
// controller: remarkControlle
|
|
|
|
|
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
if (isSelected) {
|
|
|
|
|
mySelectedAllergy
|
|
|
|
|
.remark = value;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
validator: (value) {
|
|
|
|
|
if (value == null)
|
|
|
|
|
return TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.emptyMessage;
|
|
|
|
|
else
|
|
|
|
|
return null;
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
isExpand: mySelectedAllergy != null
|
|
|
|
|
? mySelectedAllergy.isExpanded
|
|
|
|
|
: false,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
isExpand: mySelectedAllergy != null
|
|
|
|
|
? mySelectedAllergy.isExpanded
|
|
|
|
|
: false,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
))),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
))),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|