Changes for Laser clinic full body part

merge-update-with-lab-changes
haroon amjad 1 year ago
parent baa7790b89
commit 291cf16d22

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

@ -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) {

@ -18,6 +18,7 @@ class LaserBodyParts {
}
Map<String, Widget> maleBodyMap = {
"1": imagePng("assets/images/new/body_parts/male/full_body_male.png"),
"40": imagePng("assets/images/new/body_parts/male/upper_arm.png"),
"41": imagePng("assets/images/new/body_parts/male/lower_arm.png"),
"42": imagePng("assets/images/new/body_parts/male/chest.png"),
@ -43,6 +44,7 @@ class LaserBodyParts {
};
Map<String, Widget> maleBodyRetouchMap = {
"50": imagePng("assets/images/new/body_parts/male/full_body_male.png"),
"51": imagePng("assets/images/new/body_parts/male/upper_arm.png"),
"52": imagePng("assets/images/new/body_parts/male/lower_arm.png"),
"53": imagePng("assets/images/new/body_parts/male/chest.png"),
@ -57,6 +59,7 @@ class LaserBodyParts {
};
Map<String, Widget> femaleBodyMap = {
"1": imagePng("assets/images/new/body_parts/female/full_body_female.png"),
"40": imagePng("assets/images/new/body_parts/female/upper_arm.png"),
"41": imagePng("assets/images/new/body_parts/female/lower_arm.png"),
"42": imagePng("assets/images/new/body_parts/female/chest.png"),
@ -89,6 +92,7 @@ class LaserBodyParts {
};
Map<String, Widget> femaleBodyRetouchMap = {
"50": imagePng("assets/images/new/body_parts/female/full_body_female.png"),
"51": imagePng("assets/images/new/body_parts/female/upper_arm.png"),
"52": imagePng("assets/images/new/body_parts/female/lower_arm.png"),
"53": imagePng("assets/images/new/body_parts/female/chest.png"),

Loading…
Cancel
Save