|
|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/app_export.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
|
|
|
|
@ -8,7 +9,9 @@ import 'package:hmg_patient_app_new/features/book_appointments/models/laser_body
|
|
|
|
|
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/laser_body_parts.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:smooth_corner/smooth_corner.dart';
|
|
|
|
|
|
|
|
|
|
class BodyPartsListing extends StatelessWidget {
|
|
|
|
|
final List<LaserBodyPart> parts;
|
|
|
|
|
@ -49,11 +52,7 @@ class BodyPartsListing extends StatelessWidget {
|
|
|
|
|
Visibility(
|
|
|
|
|
visible: !isLoading,
|
|
|
|
|
child: GridView.builder(
|
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
|
crossAxisCount: 3,
|
|
|
|
|
childAspectRatio: 85 / 107,
|
|
|
|
|
crossAxisSpacing: 4.h,
|
|
|
|
|
mainAxisSpacing: 21.h),
|
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 75 / 107, crossAxisSpacing: 4.h, mainAxisSpacing: 21.h),
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: parts.length,
|
|
|
|
|
@ -73,7 +72,7 @@ class BodyPartsListing extends StatelessWidget {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AspectRatio(
|
|
|
|
|
aspectRatio: 130 / 120,
|
|
|
|
|
aspectRatio: 150 / 140,
|
|
|
|
|
child: FittedBox(
|
|
|
|
|
fit: BoxFit.fitWidth,
|
|
|
|
|
child: Stack(
|
|
|
|
|
@ -112,14 +111,41 @@ class BodyPartsListing extends StatelessWidget {
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
context.read<BookAppointmentsViewModel>().getLaserProcedureNameWRTLanguage(parts[index]).toText12(isBold: true, color: AppColors.textColor, isCenter: true, maxLine: 2),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
"${LocaleKeys.mins.tr()}: ".toText12(isBold: true, color: AppColors.textColor, isCenter: true, maxLine: 2),
|
|
|
|
|
parts[index].timeDuration!.toText12(isBold: true, color: AppColors.textColor, isCenter: true, maxLine: 2),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
context.read<BookAppointmentsViewModel>().getLaserProcedureNameWRTLanguage(parts[index]).toText12(isBold: true, color: AppColors.textColor, isCenter: true, maxLine: 1),
|
|
|
|
|
SizedBox(height: 4.h),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
backgroundColor: _isSelected ? AppColors.chipSecondaryLightRedColor : AppColors.whiteColor,
|
|
|
|
|
textColor: _isSelected ? AppColors.chipPrimaryRedBorderColor : AppColors.blackColor,
|
|
|
|
|
// labelText: "${parts[index].timeDuration!} ${LocaleKeys.mins.tr()}",
|
|
|
|
|
richText: "${parts[index].timeDuration!} ${LocaleKeys.mins.tr()}".toText12(
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
color: _isSelected ? AppColors.chipPrimaryRedBorderColor : AppColors.blackColor,
|
|
|
|
|
),
|
|
|
|
|
icon: AppAssets.waiting_time_clock,
|
|
|
|
|
iconHasColor: true,
|
|
|
|
|
iconColor: _isSelected ? AppColors.chipPrimaryRedBorderColor : AppColors.blackColor,
|
|
|
|
|
iconSize: 16,
|
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(start: 8.w, end: 8.w),
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.w),
|
|
|
|
|
deleteIconSize: Size(18.w, 18.h),
|
|
|
|
|
shape: SmoothRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.r),
|
|
|
|
|
smoothness: 10,
|
|
|
|
|
side: BorderSide(color: _isSelected ? AppColors.chipPrimaryRedBorderColor : AppColors.borderGrayColor, width: 1),
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
|
|
// AppCustomChipWidget(
|
|
|
|
|
// labelText: "${parts[index].timeDuration!} ${LocaleKeys.mins.tr()}",
|
|
|
|
|
// backgroundColor: AppColors.whiteColor,
|
|
|
|
|
// // textColor: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus),
|
|
|
|
|
// ),
|
|
|
|
|
// Row(
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
// children: [
|
|
|
|
|
// "${LocaleKeys.mins.tr()}: ".toText12(isBold: true, color: AppColors.textColor, isCenter: true, maxLine: 2),
|
|
|
|
|
// parts[index].timeDuration!.toText12(isBold: true, color: AppColors.textColor, isCenter: true, maxLine: 2),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|