From 14771b32d36531fd2a06573627107d422ab2ddc6 Mon Sep 17 00:00:00 2001 From: tahaalam Date: Tue, 14 Apr 2026 16:14:11 +0300 Subject: [PATCH] reminder changes --- assets/langs/ar-SA.json | 6 +- assets/langs/en-US.json | 4 +- lib/core/utils/calender_utils_new.dart | 6 +- .../appointment_details_page.dart | 426 ++++++++++++------ .../book_appointment/widgets/bell_switch.dart | 4 +- 5 files changed, 292 insertions(+), 154 deletions(-) diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index f339bdd0..7b6c06d4 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -114,7 +114,7 @@ "yes": "نعم", "no": "لا", "logintyperadio": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي.", - "registernow": "سجل الآن", + "registernow": "تسجيل", "nationalID": "أدخل رقم الهوية", "nationalId": "الهوية الوطنية", "fileNo": "رقم الملف", @@ -817,8 +817,8 @@ "pleaseChooseOption": "الرجاء اختيار من الخيارات أدناه لتلقي رمز التحقق OTP", "prepareToElevate": "رعايتك الصحية تبدأ من هنا", "iAcceptTermsConditions": "أوافق على الشروط والأحكام", - "alreadyHaveAccount": "هل لديك حساب بالفعل؟", - "loginNow": "تسجيل الدخول الآن", + "alreadyHaveAccount": "لديك حساب؟", + "loginNow": "تسجيل الدخول", "notice": "إشعار", "oR": "أو", "sendOTPWHATSAPP": "واتساب", diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index ddecd702..dee355f6 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -112,7 +112,7 @@ "yes": "Yes", "no": "No", "logintyperadio": " Choose from the below options to login to your medical file.", - "registernow": "Register Now", + "registernow": "Register", "nationalID": "Enter the Identification Number", "nationalId": "National ID", "fileNo": "File Number", @@ -849,7 +849,7 @@ "didntReceiveIt": "Didn't receive it?", "resendOTP": "Resend", "resendIn": "resend in", - "pleaseEnterAnationalID": "Please enter a national ID", + "pleaseEnterAnationalID": "ID or Iqama number is required", "pleaseEnterAFileNumber": "Please enter a file number", "pleaseEnterAValidEmail": "Please enter a valid email", "pleaseEnterFullName": "Please enter full name", diff --git a/lib/core/utils/calender_utils_new.dart b/lib/core/utils/calender_utils_new.dart index a30de823..bbf69119 100644 --- a/lib/core/utils/calender_utils_new.dart +++ b/lib/core/utils/calender_utils_new.dart @@ -87,9 +87,9 @@ class CalenderUtilsNew { await ensureCalendarsLoaded(); var writableCalendars = writableCalender.first; String eventResult = ""; - CalendarPermissionStatus result = await DeviceCalendar.instance.hasPermissions(); - if (result != CalendarPermissionStatus.granted) await DeviceCalendar.instance.requestPermissions(); - print(result); + // CalendarPermissionStatus result = await DeviceCalendar.instance.hasPermissions(); + // if (result != CalendarPermissionStatus.granted) await DeviceCalendar.instance.requestPermissions(); + // print(result); // String eventId = await getEventIdIfEventExist(title!.split("#").last); // if (eventId.isEmpty) { diff --git a/lib/presentation/appointments/appointment_details_page.dart b/lib/presentation/appointments/appointment_details_page.dart index 545fdb18..66d2b151 100644 --- a/lib/presentation/appointments/appointment_details_page.dart +++ b/lib/presentation/appointments/appointment_details_page.dart @@ -110,8 +110,7 @@ class _AppointmentDetailsPageState extends State { WidgetsBinding.instance.addPostFrameCallback((_) async { if (mounted) { _startCountdownTimer(); - await _checkAndUpdateReminderStatus(); - + // await _checkAndUpdateReminderStatus(); } }); } @@ -414,6 +413,145 @@ class _AppointmentDetailsPageState extends State { ], ), ), + SizedBox(height: 16.h), + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Utils.buildSvgWithAssets(icon: AppAssets.prescription_reminder_icon, width: 40.w, height: 40.h, applyThemeColor: false), + SizedBox(width: 8.w), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + spacing: 4.h, + children: [ + LocaleKeys.setReminder.tr(context: context).toText13(isBold: true), + LocaleKeys.notifyMeBeforeAppointment.tr(context: context).toText11(color: AppColors.textColorLight, isBold: true), + ], + ), + const Spacer(), + BellAnimatedSwitch( + key: _bellSwitchKey, + width: 48.w, + height: 30.h, + initialValue: widget.patientAppointmentHistoryResponseModel.hasReminder ?? false, + activeColor: AppColors.successColor.withOpacity(0.2), + inactiveColor: AppColors.lightGrayBGColor, + activeCircleColor: AppColors.successColor, + inactiveCircleColor: AppColors.greyTextColor, + activeIconColor: AppColors.bgGreenColor, + inactiveIconColor: AppColors.greyTextColor, + activeIcon: Utils.buildSvgWithAssets(icon: AppAssets.bell, iconColor: AppColors.whiteColor, width: 12.w, height: 12.h), + inactiveIcon: Utils.buildSvgWithAssets(icon: AppAssets.bell, iconColor: AppColors.whiteColor, width: 12.w, height: 12.h), + onChanged: (newValue) async { + CalenderUtilsNew calender = CalenderUtilsNew.instance; + bool isEventAddedOrRemoved = false; + if (newValue == true) { + DateTime startDate = DateTime.now(); + DateTime endDate = DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate); + + // Show reminder bottom sheet and check if permission was granted + bool permissionGranted = await BottomSheetUtils().showReminderBottomSheet( + context, + endDate, + widget.patientAppointmentHistoryResponseModel.doctorNameObj ?? "", + "${widget.patientAppointmentHistoryResponseModel.appointmentNo}" ?? "", + "", + "", + title: "Appointment with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}", + description: + "${widget.patientAppointmentHistoryResponseModel.doctorNameObj} will be having an appointment on ${widget.patientAppointmentHistoryResponseModel.appointmentDate}", + onSuccess: () { + setState(() { + myAppointmentsViewModel.setAppointmentReminder(newValue, widget.patientAppointmentHistoryResponseModel); + }); + }, + isMultiAllowed: true, + onMultiDateSuccess: (int selectedIndex) async { + isEventAddedOrRemoved = await calender.createOrUpdateEvent( + title: + "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} on ${DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate)}, Appointment #${widget.patientAppointmentHistoryResponseModel.appointmentNo}", + description: + "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} in ${widget.patientAppointmentHistoryResponseModel.projectName}", + scheduleDateTime: DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate), + eventId: "${widget.patientAppointmentHistoryResponseModel.appointmentNo}", + location: '', + reminderMinutes: selectedIndex); + setState(() { + myAppointmentsViewModel.setAppointmentReminder(isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel); + }); + }, + ); + + // If permission was not granted, revert the switch back to OFF + if (!permissionGranted) { + _bellSwitchKey.currentState?.setSwitchValue(false); + } + } else { + isEventAddedOrRemoved = await calender.checkAndRemove( + id: "${widget.patientAppointmentHistoryResponseModel.appointmentNo}", + ); + setState(() { + myAppointmentsViewModel.setAppointmentReminder(!isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel); + }); + } + }, + ) + + // Switch( + // activeThumbColor: AppColors.successColor, + // // activeTrackColor: AppColors.successColor.withValues(alpha: .15), + // value: widget.patientAppointmentHistoryResponseModel.hasReminder!, + // onChanged: (newValue) async { + // CalenderUtilsNew calender = CalenderUtilsNew.instance; + // bool isEventAddedOrRemoved = false; + // if(newValue == true){ + // DateTime startDate = DateTime.now(); + // DateTime endDate = DateUtil.convertStringToDate(widget + // .patientAppointmentHistoryResponseModel.appointmentDate); + // BottomSheetUtils().showReminderBottomSheet( + // context, + // endDate, + // widget.patientAppointmentHistoryResponseModel.doctorNameObj??"", + // "${widget.patientAppointmentHistoryResponseModel.appointmentNo}"??"", + // "", + // "", + // title: "Appointment with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}", + // description: + // "${widget.patientAppointmentHistoryResponseModel.doctorNameObj} will be having an appointment on ${widget.patientAppointmentHistoryResponseModel.appointmentDate}", + // onSuccess: () { + // setState(() { + // myAppointmentsViewModel.setAppointmentReminder(newValue, widget.patientAppointmentHistoryResponseModel); + // }); + // }, + // isMultiAllowed: true, + // onMultiDateSuccess: (int selectedIndex) async { + // isEventAddedOrRemoved = await calender.createOrUpdateEvent( + // title: + // "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} on ${DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate)}, Appointment #${widget.patientAppointmentHistoryResponseModel.appointmentNo}", + // description: + // "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} in ${widget.patientAppointmentHistoryResponseModel.projectName}", + // scheduleDateTime: DateUtil.convertStringToDate(widget + // .patientAppointmentHistoryResponseModel.appointmentDate), + // eventId: "${widget.patientAppointmentHistoryResponseModel.appointmentNo}", + // location: '', + // reminderMinutes: selectedIndex + // ); + // setState(() { + // myAppointmentsViewModel.setAppointmentReminder(isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel); + // }); + // }, + // ); + // }else { + // isEventAddedOrRemoved = await calender.checkAndRemove( id:"${widget.patientAppointmentHistoryResponseModel.appointmentNo}", ); + // setState(() { + // myAppointmentsViewModel.setAppointmentReminder(!isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel); + // }); + // } + // + // + // }, + // ), + ], + ).paddingSymmetrical(16.w, 0) ], ), ), @@ -585,148 +723,148 @@ class _AppointmentDetailsPageState extends State { ); }), SizedBox(height: 16.h), - Container( - decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, - borderRadius: 20.r, - hasShadow: false, - ), - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - Utils.buildSvgWithAssets(icon: AppAssets.prescription_reminder_icon, width: 35.h, height: 35.h, applyThemeColor: false), - SizedBox(width: 8.h), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - LocaleKeys.setReminder.tr(context: context).toText13(isBold: true), - LocaleKeys.notifyMeBeforeAppointment.tr(context: context).toText11(color: AppColors.textColorLight, isBold: true), - ], - ), - const Spacer(), - BellAnimatedSwitch( - key: _bellSwitchKey, - initialValue: widget.patientAppointmentHistoryResponseModel.hasReminder ?? false, - activeColor: AppColors.successColor.withOpacity(0.2), - inactiveColor: AppColors.lightGrayBGColor, - activeCircleColor: AppColors.successColor, - inactiveCircleColor: AppColors.greyTextColor, - activeIconColor: AppColors.bgGreenColor, - inactiveIconColor: AppColors.greyTextColor, - activeIcon: Utils.buildSvgWithAssets(icon: AppAssets.bell, iconColor: AppColors.whiteColor, width: 15.w, height: 15.h), - inactiveIcon: Utils.buildSvgWithAssets(icon: AppAssets.bell, iconColor: AppColors.whiteColor, width: 15.w, height: 15.h), - onChanged: (newValue) async { - CalenderUtilsNew calender = CalenderUtilsNew.instance; - bool isEventAddedOrRemoved = false; - if (newValue == true) { - DateTime startDate = DateTime.now(); - DateTime endDate = DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate); - - // Show reminder bottom sheet and check if permission was granted - bool permissionGranted = await BottomSheetUtils().showReminderBottomSheet( - context, - endDate, - widget.patientAppointmentHistoryResponseModel.doctorNameObj ?? "", - "${widget.patientAppointmentHistoryResponseModel.appointmentNo}" ?? "", - "", - "", - title: "Appointment with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}", - description: - "${widget.patientAppointmentHistoryResponseModel.doctorNameObj} will be having an appointment on ${widget.patientAppointmentHistoryResponseModel.appointmentDate}", - onSuccess: () { - setState(() { - myAppointmentsViewModel.setAppointmentReminder(newValue, widget.patientAppointmentHistoryResponseModel); - }); - }, - isMultiAllowed: true, - onMultiDateSuccess: (int selectedIndex) async { - isEventAddedOrRemoved = await calender.createOrUpdateEvent( - title: - "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} on ${DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate)}, Appointment #${widget.patientAppointmentHistoryResponseModel.appointmentNo}", - description: - "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} in ${widget.patientAppointmentHistoryResponseModel.projectName}", - scheduleDateTime: DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate), - eventId: "${widget.patientAppointmentHistoryResponseModel.appointmentNo}", - location: '', - reminderMinutes: selectedIndex); - setState(() { - myAppointmentsViewModel.setAppointmentReminder(isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel); - }); - }, - ); - - // If permission was not granted, revert the switch back to OFF - if (!permissionGranted) { - _bellSwitchKey.currentState?.setSwitchValue(false); - } - } else { - isEventAddedOrRemoved = await calender.checkAndRemove( - id: "${widget.patientAppointmentHistoryResponseModel.appointmentNo}", - ); - setState(() { - myAppointmentsViewModel.setAppointmentReminder(!isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel); - }); - } - }, - ) - - // Switch( - // activeThumbColor: AppColors.successColor, - // // activeTrackColor: AppColors.successColor.withValues(alpha: .15), - // value: widget.patientAppointmentHistoryResponseModel.hasReminder!, - // onChanged: (newValue) async { - // CalenderUtilsNew calender = CalenderUtilsNew.instance; - // bool isEventAddedOrRemoved = false; - // if(newValue == true){ - // DateTime startDate = DateTime.now(); - // DateTime endDate = DateUtil.convertStringToDate(widget - // .patientAppointmentHistoryResponseModel.appointmentDate); - // BottomSheetUtils().showReminderBottomSheet( - // context, - // endDate, - // widget.patientAppointmentHistoryResponseModel.doctorNameObj??"", - // "${widget.patientAppointmentHistoryResponseModel.appointmentNo}"??"", - // "", - // "", - // title: "Appointment with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}", - // description: - // "${widget.patientAppointmentHistoryResponseModel.doctorNameObj} will be having an appointment on ${widget.patientAppointmentHistoryResponseModel.appointmentDate}", - // onSuccess: () { - // setState(() { - // myAppointmentsViewModel.setAppointmentReminder(newValue, widget.patientAppointmentHistoryResponseModel); - // }); - // }, - // isMultiAllowed: true, - // onMultiDateSuccess: (int selectedIndex) async { - // isEventAddedOrRemoved = await calender.createOrUpdateEvent( - // title: - // "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} on ${DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate)}, Appointment #${widget.patientAppointmentHistoryResponseModel.appointmentNo}", - // description: - // "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} in ${widget.patientAppointmentHistoryResponseModel.projectName}", - // scheduleDateTime: DateUtil.convertStringToDate(widget - // .patientAppointmentHistoryResponseModel.appointmentDate), - // eventId: "${widget.patientAppointmentHistoryResponseModel.appointmentNo}", - // location: '', - // reminderMinutes: selectedIndex - // ); - // setState(() { - // myAppointmentsViewModel.setAppointmentReminder(isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel); - // }); - // }, - // ); - // }else { - // isEventAddedOrRemoved = await calender.checkAndRemove( id:"${widget.patientAppointmentHistoryResponseModel.appointmentNo}", ); - // setState(() { - // myAppointmentsViewModel.setAppointmentReminder(!isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel); - // }); - // } - // - // - // }, - // ), - ], - ).paddingSymmetrical(16.h, 16.h), - ), + // Container( + // decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + // color: AppColors.whiteColor, + // borderRadius: 20.r, + // hasShadow: false, + // ), + // child: Row( + // mainAxisSize: MainAxisSize.max, + // children: [ + // Utils.buildSvgWithAssets(icon: AppAssets.prescription_reminder_icon, width: 35.h, height: 35.h, applyThemeColor: false), + // SizedBox(width: 8.h), + // Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // LocaleKeys.setReminder.tr(context: context).toText13(isBold: true), + // LocaleKeys.notifyMeBeforeAppointment.tr(context: context).toText11(color: AppColors.textColorLight, isBold: true), + // ], + // ), + // const Spacer(), + // BellAnimatedSwitch( + // key: _bellSwitchKey, + // initialValue: widget.patientAppointmentHistoryResponseModel.hasReminder ?? false, + // activeColor: AppColors.successColor.withOpacity(0.2), + // inactiveColor: AppColors.lightGrayBGColor, + // activeCircleColor: AppColors.successColor, + // inactiveCircleColor: AppColors.greyTextColor, + // activeIconColor: AppColors.bgGreenColor, + // inactiveIconColor: AppColors.greyTextColor, + // activeIcon: Utils.buildSvgWithAssets(icon: AppAssets.bell, iconColor: AppColors.whiteColor, width: 15.w, height: 15.h), + // inactiveIcon: Utils.buildSvgWithAssets(icon: AppAssets.bell, iconColor: AppColors.whiteColor, width: 15.w, height: 15.h), + // onChanged: (newValue) async { + // CalenderUtilsNew calender = CalenderUtilsNew.instance; + // bool isEventAddedOrRemoved = false; + // if (newValue == true) { + // DateTime startDate = DateTime.now(); + // DateTime endDate = DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate); + // + // // Show reminder bottom sheet and check if permission was granted + // bool permissionGranted = await BottomSheetUtils().showReminderBottomSheet( + // context, + // endDate, + // widget.patientAppointmentHistoryResponseModel.doctorNameObj ?? "", + // "${widget.patientAppointmentHistoryResponseModel.appointmentNo}" ?? "", + // "", + // "", + // title: "Appointment with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}", + // description: + // "${widget.patientAppointmentHistoryResponseModel.doctorNameObj} will be having an appointment on ${widget.patientAppointmentHistoryResponseModel.appointmentDate}", + // onSuccess: () { + // setState(() { + // myAppointmentsViewModel.setAppointmentReminder(newValue, widget.patientAppointmentHistoryResponseModel); + // }); + // }, + // isMultiAllowed: true, + // onMultiDateSuccess: (int selectedIndex) async { + // isEventAddedOrRemoved = await calender.createOrUpdateEvent( + // title: + // "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} on ${DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate)}, Appointment #${widget.patientAppointmentHistoryResponseModel.appointmentNo}", + // description: + // "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} in ${widget.patientAppointmentHistoryResponseModel.projectName}", + // scheduleDateTime: DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate), + // eventId: "${widget.patientAppointmentHistoryResponseModel.appointmentNo}", + // location: '', + // reminderMinutes: selectedIndex); + // setState(() { + // myAppointmentsViewModel.setAppointmentReminder(isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel); + // }); + // }, + // ); + // + // // If permission was not granted, revert the switch back to OFF + // if (!permissionGranted) { + // _bellSwitchKey.currentState?.setSwitchValue(false); + // } + // } else { + // isEventAddedOrRemoved = await calender.checkAndRemove( + // id: "${widget.patientAppointmentHistoryResponseModel.appointmentNo}", + // ); + // setState(() { + // myAppointmentsViewModel.setAppointmentReminder(!isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel); + // }); + // } + // }, + // ) + // + // // Switch( + // // activeThumbColor: AppColors.successColor, + // // // activeTrackColor: AppColors.successColor.withValues(alpha: .15), + // // value: widget.patientAppointmentHistoryResponseModel.hasReminder!, + // // onChanged: (newValue) async { + // // CalenderUtilsNew calender = CalenderUtilsNew.instance; + // // bool isEventAddedOrRemoved = false; + // // if(newValue == true){ + // // DateTime startDate = DateTime.now(); + // // DateTime endDate = DateUtil.convertStringToDate(widget + // // .patientAppointmentHistoryResponseModel.appointmentDate); + // // BottomSheetUtils().showReminderBottomSheet( + // // context, + // // endDate, + // // widget.patientAppointmentHistoryResponseModel.doctorNameObj??"", + // // "${widget.patientAppointmentHistoryResponseModel.appointmentNo}"??"", + // // "", + // // "", + // // title: "Appointment with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}", + // // description: + // // "${widget.patientAppointmentHistoryResponseModel.doctorNameObj} will be having an appointment on ${widget.patientAppointmentHistoryResponseModel.appointmentDate}", + // // onSuccess: () { + // // setState(() { + // // myAppointmentsViewModel.setAppointmentReminder(newValue, widget.patientAppointmentHistoryResponseModel); + // // }); + // // }, + // // isMultiAllowed: true, + // // onMultiDateSuccess: (int selectedIndex) async { + // // isEventAddedOrRemoved = await calender.createOrUpdateEvent( + // // title: + // // "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} on ${DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate)}, Appointment #${widget.patientAppointmentHistoryResponseModel.appointmentNo}", + // // description: + // // "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} in ${widget.patientAppointmentHistoryResponseModel.projectName}", + // // scheduleDateTime: DateUtil.convertStringToDate(widget + // // .patientAppointmentHistoryResponseModel.appointmentDate), + // // eventId: "${widget.patientAppointmentHistoryResponseModel.appointmentNo}", + // // location: '', + // // reminderMinutes: selectedIndex + // // ); + // // setState(() { + // // myAppointmentsViewModel.setAppointmentReminder(isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel); + // // }); + // // }, + // // ); + // // }else { + // // isEventAddedOrRemoved = await calender.checkAndRemove( id:"${widget.patientAppointmentHistoryResponseModel.appointmentNo}", ); + // // setState(() { + // // myAppointmentsViewModel.setAppointmentReminder(!isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel); + // // }); + // // } + // // + // // + // // }, + // // ), + // ], + // ).paddingSymmetrical(16.h, 16.h), + // ), SizedBox(height: 16.h), ], ) diff --git a/lib/presentation/book_appointment/widgets/bell_switch.dart b/lib/presentation/book_appointment/widgets/bell_switch.dart index ea3746a0..c002e59a 100644 --- a/lib/presentation/book_appointment/widgets/bell_switch.dart +++ b/lib/presentation/book_appointment/widgets/bell_switch.dart @@ -27,8 +27,8 @@ class BellAnimatedSwitch extends StatefulWidget { this.inactiveCircleColor, this.activeIcon, this.inactiveIcon, - this.width = 70, - this.height = 40, + this.width = 48, + this.height = 30, this.animationDuration = const Duration(milliseconds: 300), });