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

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

Loading…
Cancel
Save