|
|
|
|
@ -77,8 +77,9 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
|
|
|
|
|
res['Laser_GetBodyPartsByCategoryList'].forEach((v) {
|
|
|
|
|
_tempList.add(LaserBodyPart.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
if (_tempList[0].category == 1 || _tempList[0].category == 11 || _tempList[0].category == 2 || _tempList[0].category == 10) {
|
|
|
|
|
fullBody = _tempList[0];
|
|
|
|
|
// if (_tempList[0].category == 1 || _tempList[0].category == 11 || _tempList[0].category == 2 || _tempList[0].category == 10) {
|
|
|
|
|
if (_tempList[0].category == 2 || _tempList[0].category == 10) {
|
|
|
|
|
// fullBody = _tempList[0];
|
|
|
|
|
_tempList.removeAt(0);
|
|
|
|
|
}
|
|
|
|
|
laserBodyPartsList = _tempList;
|
|
|
|
|
@ -260,8 +261,15 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
|
|
|
|
|
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: true,)))
|
|
|
|
|
.then((value) {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: SearchResults(
|
|
|
|
|
isLiveCareAppointment: false,
|
|
|
|
|
doctorsList: docList,
|
|
|
|
|
patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital,
|
|
|
|
|
isDoctorSearchResult: true,
|
|
|
|
|
))).then((value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
// dropdownValue = null;
|
|
|
|
|
});
|
|
|
|
|
@ -356,46 +364,47 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
if (fullBody != null)
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 22,
|
|
|
|
|
height: 22,
|
|
|
|
|
child: Theme(
|
|
|
|
|
data: Theme.of(context).copyWith(
|
|
|
|
|
unselectedWidgetColor: Color(0xffEAEAEA),
|
|
|
|
|
),
|
|
|
|
|
child: Checkbox(
|
|
|
|
|
value: _isFullBody,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (value!) {
|
|
|
|
|
_selectedBodyPartList.clear();
|
|
|
|
|
_selectedBodyPartList.add(fullBody);
|
|
|
|
|
} else {
|
|
|
|
|
_selectedBodyPartList.clear();
|
|
|
|
|
}
|
|
|
|
|
_isFullBody = !_isFullBody;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
activeColor: Color(0xffD02127),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 12),
|
|
|
|
|
Text(
|
|
|
|
|
projectViewModel.isArabic ? fullBody.bodyPartN! : fullBody.bodyPart!,
|
|
|
|
|
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.6, height: 21 / 14),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
// if (fullBody != null)
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// width: 22,
|
|
|
|
|
// height: 22,
|
|
|
|
|
// child: Theme(
|
|
|
|
|
// data: Theme.of(context).copyWith(
|
|
|
|
|
// unselectedWidgetColor: Color(0xffEAEAEA),
|
|
|
|
|
// ),
|
|
|
|
|
// child: Checkbox(
|
|
|
|
|
// value: _isFullBody,
|
|
|
|
|
// onChanged: (value) {
|
|
|
|
|
// setState(() {
|
|
|
|
|
// if (value!) {
|
|
|
|
|
// _selectedBodyPartList.clear();
|
|
|
|
|
// _selectedBodyPartList.add(fullBody);
|
|
|
|
|
// } else {
|
|
|
|
|
// _selectedBodyPartList.clear();
|
|
|
|
|
// }
|
|
|
|
|
// _isFullBody = !_isFullBody;
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// activeColor: Color(0xffD02127),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(width: 12),
|
|
|
|
|
// Text(
|
|
|
|
|
// projectViewModel.isArabic ? fullBody.bodyPartN! : fullBody.bodyPart!,
|
|
|
|
|
// style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.6, height: 21 / 14),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
GridView.builder(
|
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 85 / 107, crossAxisSpacing: 4, mainAxisSpacing: 21),
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: laserBodyPartsList.length,
|
|
|
|
|
padding: fullBody != null ? EdgeInsets.only(top: 16) : EdgeInsets.zero,
|
|
|
|
|
// padding: fullBody != null ? EdgeInsets.only(top: 16) : EdgeInsets.zero,
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
bool _isSelected = _selectedBodyPartList.any((file) => file.id == laserBodyPartsList[index].id);
|
|
|
|
|
return InkWell(
|
|
|
|
|
@ -410,7 +419,7 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
|
|
|
|
|
setState(() {});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
AppToast.showToast(message: TranslationBase.of(context).laserMaxLimitReach);
|
|
|
|
|
AppToast.showToast(message: TranslationBase.of(context).laserMaxLimitReach, timeInSeconds: 3);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (_isSelected) {
|
|
|
|
|
|