|
|
|
@ -44,57 +44,58 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
|
|
|
|
|
baseViewModel: widget.model,
|
|
|
|
|
body: Column(
|
|
|
|
|
children: [
|
|
|
|
|
ListView.separated(
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: EdgeInsets.only(left: 21, right: 21, top: 12, bottom: 12),
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
HHCGetAllServicesResponseModel service = widget.model.hhcAllServicesList[index];
|
|
|
|
|
Expanded(
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: EdgeInsets.only(left: 21, right: 21, top: 12, bottom: 12),
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
HHCGetAllServicesResponseModel service = widget.model.hhcAllServicesList[index];
|
|
|
|
|
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: const EdgeInsets.only(top: 4, bottom: 4),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: isServiceSelected(num.tryParse(service.serviceID)),
|
|
|
|
|
activeColor: Color(0xffD02127),
|
|
|
|
|
tristate: false,
|
|
|
|
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (!isServiceSelected(num.tryParse(service.serviceID)))
|
|
|
|
|
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.add(PatientERHHCInsertServicesList(
|
|
|
|
|
recordID: widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length,
|
|
|
|
|
serviceID: num.tryParse(service.serviceID),
|
|
|
|
|
serviceName: projectViewModel.isArabic ? service.textN : service.text));
|
|
|
|
|
else
|
|
|
|
|
removeSelected(num.tryParse(service.serviceID));
|
|
|
|
|
// widget.patientERInsertPresOrderRequestModel
|
|
|
|
|
// isPatientInsured = newValue;
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(width: 6),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
projectViewModel.isArabic ? service.textN : service.text.toLowerCase()?.capitalize(),
|
|
|
|
|
maxLines: 1,
|
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64),
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: const EdgeInsets.only(top: 4, bottom: 4),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: isServiceSelected(num.tryParse(service.serviceID)),
|
|
|
|
|
activeColor: Color(0xffD02127),
|
|
|
|
|
tristate: false,
|
|
|
|
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (!isServiceSelected(num.tryParse(service.serviceID)))
|
|
|
|
|
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.add(PatientERHHCInsertServicesList(
|
|
|
|
|
recordID: widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length,
|
|
|
|
|
serviceID: num.tryParse(service.serviceID),
|
|
|
|
|
serviceName: projectViewModel.isArabic ? service.textN : service.text));
|
|
|
|
|
else
|
|
|
|
|
removeSelected(num.tryParse(service.serviceID));
|
|
|
|
|
// widget.patientERInsertPresOrderRequestModel
|
|
|
|
|
// isPatientInsured = newValue;
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(width: 6),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
projectViewModel.isArabic ? service.textN : service.text.toLowerCase()?.capitalize(),
|
|
|
|
|
maxLines: 1,
|
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (context, index) => Divider(
|
|
|
|
|
height: 1,
|
|
|
|
|
color: Color(0xffE5E5E5),
|
|
|
|
|
),
|
|
|
|
|
itemCount: widget.model.hhcAllServicesList.length),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (context, index) => Divider(
|
|
|
|
|
height: 1,
|
|
|
|
|
color: Color(0xffE5E5E5),
|
|
|
|
|
),
|
|
|
|
|
itemCount: widget.model.hhcAllServicesList.length),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
padding: EdgeInsets.only(top: 0, bottom: 16, right: 21, left: 21),
|
|
|
|
|
margin: EdgeInsets.only(top: 50.0),
|
|
|
|
|
padding: EdgeInsets.all(16),
|
|
|
|
|
child: DefaultButton(
|
|
|
|
|
TranslationBase.of(context).next,
|
|
|
|
|
(this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length == 0 || widget.model.state == ViewState.BusyLocal)
|
|
|
|
|