From 2c746bf783c5f1289bb8919c6c508ceaa9ea3d2c Mon Sep 17 00:00:00 2001 From: sultan khan Date: Tue, 4 Mar 2025 11:18:29 +0300 Subject: [PATCH 01/10] next day appointments change. --- .../components/DocAvailableAppointments.dart | 151 ++++++++++++++++-- 1 file changed, 141 insertions(+), 10 deletions(-) diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index 6e12c68e..45db7f8b 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -45,16 +45,17 @@ class _DocAvailableAppointmentsState extends State wit AppSharedPreferences sharedPref = new AppSharedPreferences(); var selectedDate = ""; + var selectedNextDate = ""; dynamic selectedDateJSON; dynamic jsonFreeSlots; - + final DateFormat dateFormatter = DateFormat('yyyy-MM-dd'); List docFreeSlots = []; List dayEvents = []; - + List nextDayEvents = []; int selectedButtonIndex = 0; - + int selectedNextDayButtonIndex = -1; dynamic freeSlotsResponse; - + String nextDayAppointmentDate =""; late ScrollController _scrollController; var language; @@ -115,9 +116,11 @@ class _DocAvailableAppointmentsState extends State wit final DateFormat formatter = DateFormat('yyyy-MM-dd'); setState(() { this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, language); + this.selectedNextDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day.add(Duration(days: 1)), language); + _calendarController.selectedDate = day; openTimeSlotsPickerForDate(day, docFreeSlots); DocAvailableAppointments.selectedDate = formatter.format(day); - _calendarController.selectedDate = day; + nextDayAppointmentDate = formatter.format(day.add(Duration(days: 1))); print(_calendarController.selectedDate); }); } @@ -139,9 +142,12 @@ class _DocAvailableAppointmentsState extends State wit child: Text(selectedDate, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600, letterSpacing: -0.64)), ), DocAvailableAppointments.areSlotsAvailable - ? Container( + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ Container( height: 40, - child: ListView.builder( + child: + ListView.builder( controller: _scrollController, scrollDirection: Axis.horizontal, itemCount: dayEvents.length, @@ -152,7 +158,30 @@ class _DocAvailableAppointmentsState extends State wit ); }, ), - ) + ), + SizedBox(height: 20,), + nextDayEvents.isNotEmpty ? Container( + padding: EdgeInsets.only(left: 20, right: 20, bottom:20), + child: Text(selectedNextDate, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black))) :SizedBox(), + Container( + height: 40, + padding: EdgeInsets.only(left: 0, right: 0), + child: + ListView.builder( + controller: _scrollController, + scrollDirection: Axis.horizontal, + itemCount: nextDayEvents.length, + itemBuilder: (context, index) { + return Container( + margin: EdgeInsets.only(right: (index == nextDayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), + child: index == selectedNextDayButtonIndex ? getSelectedNextDayButton(index) : getNormalNextDayButton(index), + ); + }, + ), + ) + ],) + + : Center( child: Padding( padding: const EdgeInsets.only(left: 12.0, right: 12.0), @@ -225,21 +254,34 @@ class _DocAvailableAppointmentsState extends State wit Map timeSlot = {"isoTime": dayEvents[i].isoTime, "start": dayEvents[i].start.toString(), "end": dayEvents[i].end.toString(), "vidaDate": dayEvents[i].vidaDate}; timeList.add(timeSlot); } - + filterNextDayAppo(freeSlots, timeList.last); AppSharedPreferences sharedPref = new AppSharedPreferences(); sharedPref.setString('selectedLogSlots', json.encode(timeList)); DocAvailableAppointments.selectedTime = dayEvents[selectedButtonIndex].isoTime; } else DocAvailableAppointments.areSlotsAvailable = false; }); + } + filterNextDayAppo(List freeSlots, Map listList){ + DateTime dateStart = DateTime.parse(listList['end']).add(Duration(hours: 6)); + DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0); + nextDayEvents = []; + DateTime? previousDate = _calendarController.selectedDate != null ? _calendarController.selectedDate : _calendarController.displayDate; + // if(DateUtils.isSameDay(dateStart, previousDate!.add(Duration(days:1)) )) { + + freeSlots.forEach((v) { + if (v.start == dateStartObj && v.end!.isBefore(dateStart) ) nextDayEvents.add(v); + }); + print(nextDayEvents); + // } + } Future> _getJSONSlots() async { Map _eventsParsed; List slotsList = []; DateTime date; final DateFormat formatter = DateFormat('HH:mm'); - final DateFormat dateFormatter = DateFormat('yyyy-MM-dd'); for (var i = 0; i < freeSlotsResponse.length; i++) { date = (isLiveCareSchedule != null && isLiveCareSchedule) ? DateUtil.convertStringToDate(freeSlotsResponse[i]) @@ -259,6 +301,16 @@ class _DocAvailableAppointmentsState extends State wit ), ), ); + nextDayAppointmentDate = dateFormatter.format( + (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]).add(Duration(days:1)) + : DateUtil.convertStringToDateSaudiTimezone( + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ).add(Duration(days:1)), + ); DocAvailableAppointments.selectedAppoDateTime = (isLiveCareSchedule != null && isLiveCareSchedule) ? DateUtil.convertStringToDate(freeSlotsResponse[0]) : DateUtil.convertStringToDateSaudiTimezone( @@ -277,6 +329,16 @@ class _DocAvailableAppointmentsState extends State wit ), ), language); + selectedNextDate = DateUtil.getWeekDayMonthDayYearDateFormatted( + (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]).add(Duration(days:1)) + : DateUtil.convertStringToDateSaudiTimezone( + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ).add(Duration(days:1)), + language); selectedDateJSON = freeSlotsResponse[0]; }); openTimeSlotsPickerForDate( @@ -319,9 +381,21 @@ class _DocAvailableAppointmentsState extends State wit DocAvailableAppointments.selectedAppoDateTime = timeslot.end; setState(() { + selectedButtonIndex = index; + selectedNextDayButtonIndex =-1; DocAvailableAppointments.selectedTime = dayEvents[index].isoTime; print(DocAvailableAppointments.selectedTime); + DocAvailableAppointments.selectedDate = dateFormatter.format( + (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]) + : DateUtil.convertStringToDateSaudiTimezone( + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ), + ); }); projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); }, @@ -342,12 +416,69 @@ class _DocAvailableAppointmentsState extends State wit setState(() { selectedButtonIndex = index; DocAvailableAppointments.selectedTime = dayEvents[index].isoTime; + DocAvailableAppointments.selectedDate = dateFormatter.format( + (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]) + : DateUtil.convertStringToDateSaudiTimezone( + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ), + ); print(DocAvailableAppointments.selectedTime); }); }, child: Text(dayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Colors.white)), ); } + Widget getNormalNextDayButton(int index) { + return CustomTextButton( + backgroundColor: Colors.white, + elevation: 0, + side: BorderSide( + color: Colors.black, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5 //width of the border + ), + onPressed: () { + final timeslot = nextDayEvents[index]; + DocAvailableAppointments.selectedAppoDateTime = timeslot.end; + + setState(() { + selectedButtonIndex = -1; + selectedNextDayButtonIndex =index; + DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; + DocAvailableAppointments.selectedDate = nextDayAppointmentDate; + print(DocAvailableAppointments.selectedTime); + }); + projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); + }, + child: Text(nextDayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Color(0xFF60686b))), + ); + } + + Widget getSelectedNextDayButton(int index) { + return CustomTextButton( + backgroundColor: nextDayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green, + elevation: 0, + side: BorderSide( + color: nextDayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5 //width of the border + ), + onPressed: () { + setState(() { + selectedButtonIndex =-1; + selectedNextDayButtonIndex = index; + DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; + DocAvailableAppointments.selectedDate = nextDayAppointmentDate; + print(DocAvailableAppointments.selectedTime); + }); + }, + child: Text(nextDayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Colors.white)), + ); + } getDoctorFreeSlots(context, DoctorList docObject) { print(DocAvailableAppointments.initialSlotDuration); From b93d373c6fcb9626375e937848d00b304b5ab2b7 Mon Sep 17 00:00:00 2001 From: sultan khan Date: Tue, 4 Mar 2025 11:40:30 +0300 Subject: [PATCH 02/10] next appointment updated. --- .../components/DocAvailableAppointments.dart | 44 ++++--------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index 45db7f8b..15eedec1 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -55,7 +55,7 @@ class _DocAvailableAppointmentsState extends State wit int selectedButtonIndex = 0; int selectedNextDayButtonIndex = -1; dynamic freeSlotsResponse; - String nextDayAppointmentDate =""; + // String nextDayAppointmentDate =""; late ScrollController _scrollController; var language; @@ -120,7 +120,7 @@ class _DocAvailableAppointmentsState extends State wit _calendarController.selectedDate = day; openTimeSlotsPickerForDate(day, docFreeSlots); DocAvailableAppointments.selectedDate = formatter.format(day); - nextDayAppointmentDate = formatter.format(day.add(Duration(days: 1))); + selectedNextDayButtonIndex =-1; print(_calendarController.selectedDate); }); } @@ -268,7 +268,7 @@ class _DocAvailableAppointmentsState extends State wit DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0); nextDayEvents = []; - DateTime? previousDate = _calendarController.selectedDate != null ? _calendarController.selectedDate : _calendarController.displayDate; + // DateTime? previousDate = _calendarController.selectedDate != null ? _calendarController.selectedDate : _calendarController.displayDate; // if(DateUtils.isSameDay(dateStart, previousDate!.add(Duration(days:1)) )) { freeSlots.forEach((v) { @@ -301,16 +301,7 @@ class _DocAvailableAppointmentsState extends State wit ), ), ); - nextDayAppointmentDate = dateFormatter.format( - (isLiveCareSchedule != null && isLiveCareSchedule) - ? DateUtil.convertStringToDate(freeSlotsResponse[0]).add(Duration(days:1)) - : DateUtil.convertStringToDateSaudiTimezone( - freeSlotsResponse[0], - int.parse( - widget.doctor.projectID.toString(), - ), - ).add(Duration(days:1)), - ); + DocAvailableAppointments.selectedAppoDateTime = (isLiveCareSchedule != null && isLiveCareSchedule) ? DateUtil.convertStringToDate(freeSlotsResponse[0]) : DateUtil.convertStringToDateSaudiTimezone( @@ -386,16 +377,8 @@ class _DocAvailableAppointmentsState extends State wit selectedNextDayButtonIndex =-1; DocAvailableAppointments.selectedTime = dayEvents[index].isoTime; print(DocAvailableAppointments.selectedTime); - DocAvailableAppointments.selectedDate = dateFormatter.format( - (isLiveCareSchedule != null && isLiveCareSchedule) - ? DateUtil.convertStringToDate(freeSlotsResponse[0]) - : DateUtil.convertStringToDateSaudiTimezone( - freeSlotsResponse[0], - int.parse( - widget.doctor.projectID.toString(), - ), - ), - ); + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!); + }); projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); }, @@ -416,16 +399,7 @@ class _DocAvailableAppointmentsState extends State wit setState(() { selectedButtonIndex = index; DocAvailableAppointments.selectedTime = dayEvents[index].isoTime; - DocAvailableAppointments.selectedDate = dateFormatter.format( - (isLiveCareSchedule != null && isLiveCareSchedule) - ? DateUtil.convertStringToDate(freeSlotsResponse[0]) - : DateUtil.convertStringToDateSaudiTimezone( - freeSlotsResponse[0], - int.parse( - widget.doctor.projectID.toString(), - ), - ), - ); + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!); print(DocAvailableAppointments.selectedTime); }); }, @@ -449,7 +423,7 @@ class _DocAvailableAppointmentsState extends State wit selectedButtonIndex = -1; selectedNextDayButtonIndex =index; DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; - DocAvailableAppointments.selectedDate = nextDayAppointmentDate; + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!.add(Duration(days:1))); print(DocAvailableAppointments.selectedTime); }); projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); @@ -472,7 +446,7 @@ class _DocAvailableAppointmentsState extends State wit selectedButtonIndex =-1; selectedNextDayButtonIndex = index; DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; - DocAvailableAppointments.selectedDate = nextDayAppointmentDate; + DocAvailableAppointments.selectedDate =dateFormatter.format(_calendarController.selectedDate!.add(Duration(days:1))); print(DocAvailableAppointments.selectedTime); }); }, From e66e42edda9f721db8f6b545bba0a95e272df4d8 Mon Sep 17 00:00:00 2001 From: sultan khan Date: Tue, 4 Mar 2025 13:11:43 +0300 Subject: [PATCH 03/10] next day appointment updates --- .../components/DocAvailableAppointments.dart | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index 15eedec1..e08d9397 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -264,18 +264,16 @@ class _DocAvailableAppointmentsState extends State wit } filterNextDayAppo(List freeSlots, Map listList){ - DateTime dateStart = DateTime.parse(listList['end']).add(Duration(hours: 6)); + DateTime dateStart = DateTime.parse(listList['end']).add(Duration(days: 1)); DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0); nextDayEvents = []; - // DateTime? previousDate = _calendarController.selectedDate != null ? _calendarController.selectedDate : _calendarController.displayDate; - // if(DateUtils.isSameDay(dateStart, previousDate!.add(Duration(days:1)) )) { - + DateTime beforeHour = new DateTime(dateStart.year, dateStart.month, dateStart.day, 6, 0, 0, 0, 0); freeSlots.forEach((v) { - if (v.start == dateStartObj && v.end!.isBefore(dateStart) ) nextDayEvents.add(v); + if (v.start == dateStartObj && v.end!.isBefore(beforeHour) ) nextDayEvents.add(v); }); - print(nextDayEvents); - // } + // print(nextDayEvents); + } Future> _getJSONSlots() async { Map _eventsParsed; From 8b74c9df61c311bd66c484a274efdf36eeb6cc6f Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 4 Mar 2025 13:35:17 +0300 Subject: [PATCH 04/10] updates --- lib/core/service/client/base_app_client.dart | 2 +- lib/core/service/medical/labs_service.dart | 2 +- .../medical/ask_doctor/ask_doctor_page.dart | 19 ++++++++++++------- .../LabResult/laboratory_result_widget.dart | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 9097d2fd..d083c422 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -187,7 +187,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; //0560717232 - // body['PatientID'] = 4769527; //4609100 + // body['PatientID'] = 2007395; //4609100 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index 9b3904be..28e922f2 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -231,7 +231,7 @@ class LabsService extends BaseService { _requestSendLabReportEmail.languageID = languageID; // await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { - await baseAppClient.post(SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(isVidaPlus ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { if (isDownload) { labReportPDF = response['PdfContent']; } diff --git a/lib/pages/medical/ask_doctor/ask_doctor_page.dart b/lib/pages/medical/ask_doctor/ask_doctor_page.dart index 036bc328..96cd9944 100644 --- a/lib/pages/medical/ask_doctor/ask_doctor_page.dart +++ b/lib/pages/medical/ask_doctor/ask_doctor_page.dart @@ -108,17 +108,22 @@ class AskDoctorPage extends StatelessWidget { ); } - Future checkIfDoctorAvailable(DoctorList _doctor, BuildContext context) { + Future checkIfDoctorAvailable(DoctorList _doctor, BuildContext context) async { + AskDoctorService askDocservice = new AskDoctorService(); bool isAvailable = false; GifLoaderDialogUtils.showMyDialog(context); - service.isDoctorAvailable(doctorId: _doctor.doctorID, projectId: _doctor.projectID, clinicId: _doctor.clinicID).then((res) { + await askDocservice.isDoctorAvailable(doctorId: _doctor.doctorID, projectId: _doctor.projectID, clinicId: _doctor.clinicID).then((res) { GifLoaderDialogUtils.hideDialog(context); - print(res['IsDoctorAvailable']); - if (res['IsDoctorAvailable']) { - isAvailable = true; + if (res != null) { + print(res['IsDoctorAvailable']); + if (res['IsDoctorAvailable']) { + isAvailable = true; + } else { + isAvailable = false; + AppToast.showErrorToast(message: res['endUserMessage'], localContext: context); + } } else { - isAvailable = false; - AppToast.showErrorToast(message: res['endUserMessage'], localContext: context); + isAvailable = true; } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart index c492ee55..68f88910 100644 --- a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart +++ b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart @@ -67,7 +67,7 @@ class _LaboratoryResultWidgetState extends State { widget.patientLabOrder!.actualDoctorRate!, widget.patientLabOrder!.noOfPatientsRate!, projectViewModel.user.emailAddress!), - buttonTitle: TranslationBase.of(context).downloadReport, + buttonTitle: TranslationBase.of(context).download, buttonIcon: "assets/images/new/download_1.svg", showConfirmMessageDialog: false, isDownload: true, From 889828d4d493b4a9a42fa5ef68da25f2a7002e24 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 5 Mar 2025 11:31:54 +0300 Subject: [PATCH 05/10] Lab report download VIDA Plus implementation --- lib/core/service/medical/labs_service.dart | 2 +- .../components/DocAvailableAppointments.dart | 141 ++++++++++-------- 2 files changed, 77 insertions(+), 66 deletions(-) diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index 28e922f2..3f83a493 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -233,7 +233,7 @@ class LabsService extends BaseService { // await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(isVidaPlus ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { if (isDownload) { - labReportPDF = response['PdfContent']; + labReportPDF = isVidaPlus ? response['LabReportsPDFContent'] : response['PdfContent']; } }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index e08d9397..67a795da 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; import 'package:flutter/cupertino.dart'; @@ -55,6 +56,7 @@ class _DocAvailableAppointmentsState extends State wit int selectedButtonIndex = 0; int selectedNextDayButtonIndex = -1; dynamic freeSlotsResponse; + // String nextDayAppointmentDate =""; late ScrollController _scrollController; @@ -120,7 +122,7 @@ class _DocAvailableAppointmentsState extends State wit _calendarController.selectedDate = day; openTimeSlotsPickerForDate(day, docFreeSlots); DocAvailableAppointments.selectedDate = formatter.format(day); - selectedNextDayButtonIndex =-1; + selectedNextDayButtonIndex = -1; print(_calendarController.selectedDate); }); } @@ -143,45 +145,51 @@ class _DocAvailableAppointmentsState extends State wit ), DocAvailableAppointments.areSlotsAvailable ? Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ Container( - height: 40, - child: - ListView.builder( - controller: _scrollController, - scrollDirection: Axis.horizontal, - itemCount: dayEvents.length, - itemBuilder: (context, index) { - return Container( - margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), - child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index), - ); - }, - ), - ), - SizedBox(height: 20,), - nextDayEvents.isNotEmpty ? Container( - padding: EdgeInsets.only(left: 20, right: 20, bottom:20), - child: Text(selectedNextDate, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black))) :SizedBox(), - Container( - height: 40, - padding: EdgeInsets.only(left: 0, right: 0), - child: - ListView.builder( - controller: _scrollController, - scrollDirection: Axis.horizontal, - itemCount: nextDayEvents.length, - itemBuilder: (context, index) { - return Container( - margin: EdgeInsets.only(right: (index == nextDayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), - child: index == selectedNextDayButtonIndex ? getSelectedNextDayButton(index) : getNormalNextDayButton(index), - ); - }, - ), - ) - ],) - - + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + height: 40, + child: ListView.builder( + controller: _scrollController, + scrollDirection: Axis.horizontal, + itemCount: dayEvents.length, + itemBuilder: (context, index) { + return Container( + margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), + child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index), + ); + }, + ), + ), + SizedBox( + height: 20, + ), + nextDayEvents.isNotEmpty && projectViewModel.havePrivilege(110) + ? Container( + padding: EdgeInsets.only(left: 20, right: 20, bottom: 20), + child: Text( + selectedNextDate, + style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black), + ), + ) + : SizedBox(), + Container( + height: 40, + padding: EdgeInsets.only(left: 0, right: 0), + child: ListView.builder( + controller: _scrollController, + scrollDirection: Axis.horizontal, + itemCount: nextDayEvents.length, + itemBuilder: (context, index) { + return Container( + margin: EdgeInsets.only(right: (index == nextDayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), + child: index == selectedNextDayButtonIndex ? getSelectedNextDayButton(index) : getNormalNextDayButton(index), + ); + }, + ), + ) + ], + ) : Center( child: Padding( padding: const EdgeInsets.only(left: 12.0, right: 12.0), @@ -261,20 +269,24 @@ class _DocAvailableAppointmentsState extends State wit } else DocAvailableAppointments.areSlotsAvailable = false; }); - } - filterNextDayAppo(List freeSlots, Map listList){ - DateTime dateStart = DateTime.parse(listList['end']).add(Duration(days: 1)); + + filterNextDayAppo(List freeSlots, Map listList) { + DateTime dateStart = DateTime.parse(listList['end']).add(Duration(days: 1)); DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0); - nextDayEvents = []; - DateTime beforeHour = new DateTime(dateStart.year, dateStart.month, dateStart.day, 6, 0, 0, 0, 0); + nextDayEvents = []; + DateTime beforeHour = new DateTime(dateStart.year, dateStart.month, dateStart.day, 6, 0, 0, 0, 0); + if (projectViewModel.havePrivilege(110)) { freeSlots.forEach((v) { - if (v.start == dateStartObj && v.end!.isBefore(beforeHour) ) nextDayEvents.add(v); + if (v.start == dateStartObj && v.end!.isBefore(beforeHour)) nextDayEvents.add(v); }); - // print(nextDayEvents); - + } else { + nextDayEvents = []; + } + // print(nextDayEvents); } + Future> _getJSONSlots() async { Map _eventsParsed; List slotsList = []; @@ -299,7 +311,7 @@ class _DocAvailableAppointmentsState extends State wit ), ), ); - + DocAvailableAppointments.selectedAppoDateTime = (isLiveCareSchedule != null && isLiveCareSchedule) ? DateUtil.convertStringToDate(freeSlotsResponse[0]) : DateUtil.convertStringToDateSaudiTimezone( @@ -318,15 +330,15 @@ class _DocAvailableAppointmentsState extends State wit ), ), language); - selectedNextDate = DateUtil.getWeekDayMonthDayYearDateFormatted( + selectedNextDate = DateUtil.getWeekDayMonthDayYearDateFormatted( (isLiveCareSchedule != null && isLiveCareSchedule) - ? DateUtil.convertStringToDate(freeSlotsResponse[0]).add(Duration(days:1)) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]).add(Duration(days: 1)) : DateUtil.convertStringToDateSaudiTimezone( - freeSlotsResponse[0], - int.parse( - widget.doctor.projectID.toString(), - ), - ).add(Duration(days:1)), + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ).add(Duration(days: 1)), language); selectedDateJSON = freeSlotsResponse[0]; }); @@ -370,13 +382,11 @@ class _DocAvailableAppointmentsState extends State wit DocAvailableAppointments.selectedAppoDateTime = timeslot.end; setState(() { - selectedButtonIndex = index; - selectedNextDayButtonIndex =-1; + selectedNextDayButtonIndex = -1; DocAvailableAppointments.selectedTime = dayEvents[index].isoTime; print(DocAvailableAppointments.selectedTime); DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!); - }); projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); }, @@ -404,6 +414,7 @@ class _DocAvailableAppointmentsState extends State wit child: Text(dayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Colors.white)), ); } + Widget getNormalNextDayButton(int index) { return CustomTextButton( backgroundColor: Colors.white, @@ -412,16 +423,16 @@ class _DocAvailableAppointmentsState extends State wit color: Colors.black, //Color of the border style: BorderStyle.solid, //Style of the border width: 1.5 //width of the border - ), + ), onPressed: () { final timeslot = nextDayEvents[index]; DocAvailableAppointments.selectedAppoDateTime = timeslot.end; setState(() { selectedButtonIndex = -1; - selectedNextDayButtonIndex =index; + selectedNextDayButtonIndex = index; DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; - DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!.add(Duration(days:1))); + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!.add(Duration(days: 1))); print(DocAvailableAppointments.selectedTime); }); projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); @@ -438,13 +449,13 @@ class _DocAvailableAppointmentsState extends State wit color: nextDayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green, //Color of the border style: BorderStyle.solid, //Style of the border width: 1.5 //width of the border - ), + ), onPressed: () { setState(() { - selectedButtonIndex =-1; + selectedButtonIndex = -1; selectedNextDayButtonIndex = index; DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; - DocAvailableAppointments.selectedDate =dateFormatter.format(_calendarController.selectedDate!.add(Duration(days:1))); + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!.add(Duration(days: 1))); print(DocAvailableAppointments.selectedTime); }); }, From 0706d9f5f9117c1a23f2e72e0a09e2687c62efda Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 5 Mar 2025 15:09:26 +0300 Subject: [PATCH 06/10] App update sent to Stores VersionID 17.7 --- ios/Runner.xcodeproj/project.pbxproj | 12 ++++++------ lib/config/config.dart | 14 +++++++------- pubspec.yaml | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 318f2f08..63df2a6d 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -583,7 +583,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -601,7 +601,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.999; + MARKETING_VERSION = 4.6.004; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -735,7 +735,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -753,7 +753,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.999; + MARKETING_VERSION = 4.6.004; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -779,7 +779,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -797,7 +797,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.999; + MARKETING_VERSION = 4.6.004; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/lib/config/config.dart b/lib/config/config.dart index 3c272d82..b02876fb 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -21,8 +21,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:2018/'; - var BASE_URL = 'https://uat.hmgwebservices.com/'; -// var BASE_URL = 'https://hmgwebservices.com/'; + // var BASE_URL = 'https://uat.hmgwebservices.com/'; +var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; @@ -353,7 +353,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 17.6; +var VERSION_ID = 17.7; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; @@ -700,10 +700,10 @@ var IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE = 'Services/OUTPs.svc/REST/HIS_IsDo //PAYFORT var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; -// var payFortEnvironment = FortEnvironment.production; -// var applePayMerchantId = "merchant.com.hmgwebservices"; -var payFortEnvironment = FortEnvironment.test; -var applePayMerchantId = "merchant.com.hmgwebservices.uat"; +var payFortEnvironment = FortEnvironment.production; +var applePayMerchantId = "merchant.com.hmgwebservices"; +// var payFortEnvironment = FortEnvironment.test; +// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; class AppGlobal { static var context; diff --git a/pubspec.yaml b/pubspec.yaml index e27ef5b0..4ece3714 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.6.083+4050083 +version: 4.6.004+1 environment: sdk: ">=3.0.0 <3.13.0" From 7ed401fb1cd7c14119852a7cf2d7d94f2516d19a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 6 Mar 2025 14:31:04 +0300 Subject: [PATCH 07/10] Riyal symbol update & sent to stores VersionID 17.8 --- lib/config/config.dart | 2 +- .../ancillaryOrdersDetails.dart | 4 ++- lib/pages/BookAppointment/BookSuccess.dart | 4 ++- .../PickupLocation.dart | 11 ++++-- .../SelectTransportationMethod.dart | 8 +++-- .../AmbulanceRequestIndexPages/Summary.dart | 4 ++- .../EROnlineCheckInPaymentDetails.dart | 7 ++-- .../rapid-response-team/rrt-place-order.dart | 22 ++++++++---- .../rapid-response-team/rrt-request-page.dart | 19 +++++----- .../livecare/live_care_payment_page.dart | 12 +++++-- .../medical/balance/confirm_payment_page.dart | 4 ++- .../medical/balance/my_balance_page.dart | 35 ++++++++++++------- pubspec.yaml | 2 +- 13 files changed, 89 insertions(+), 45 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index b02876fb..5790d43b 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -353,7 +353,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 17.7; +var VERSION_ID = 17.8; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index 02f8ebe7..61d621cd 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -200,9 +200,11 @@ class _AnicllaryOrdersState extends State with SingleTic Expanded( child: Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), _getNormalText(value, isBold: isBold, isTotal: isTotal), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ), diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 6bdc612c..61b0f9d9 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -1098,7 +1098,7 @@ class _BookSuccessState extends State { padding: EdgeInsets.only(bottom: 10.0, left: 20, right: 20), child: Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16, color: Colors.white), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16, color: Colors.white), mWidth(6), Text( text, @@ -1110,6 +1110,8 @@ class _BookSuccessState extends State { fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16, color: Colors.white) : Container(), ], ), ); diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart index 093789f3..d0beeab7 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart @@ -49,7 +49,8 @@ class _PickupLocationState extends State { // double _longitude; AppoitmentAllHistoryResultList? myAppointment; HospitalsModel? _selectedHospital; - LocationDetails? _result ; + LocationDetails? _result; + LocationUtils? locationUtils; late ProjectViewModel projectViewModel; @@ -522,12 +523,16 @@ class _PickupLocationState extends State { Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( - (widget.patientER_RC.transportationDetails!.tripType == 1 ? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}' : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'), + (widget.patientER_RC.transportationDetails!.tripType == 1 + ? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}' + : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'), style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ], diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart index 23bd8b18..1dac66a0 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart @@ -126,7 +126,7 @@ class _SelectTransportationMethodState extends State flex: 1, child: Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( ' ${widget.amRequestViewModel.amRequestModeList[index].priceTotal}', @@ -136,6 +136,8 @@ class _SelectTransportationMethodState extends State fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ) @@ -334,12 +336,14 @@ class _SelectTransportationMethodState extends State Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( (_way == Way.OneWay ? ' ${_erTransportationMethod.priceTotal}' : ' ${(_erTransportationMethod.priceTotal * 2)}'), style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ], diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart index 10be1e11..86442ce6 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart @@ -132,7 +132,7 @@ class _SummaryState extends State { Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( (widget.patientER_RC.transportationDetails!.tripType == 1 @@ -140,6 +140,8 @@ class _SummaryState extends State { : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'), style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ], diff --git a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart index 53fd0f34..1eeb5d9f 100644 --- a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart +++ b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart @@ -279,8 +279,7 @@ class _EROnlineCheckInPaymentDetailsState extends State { Expanded( child: Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 12, height: 12), + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( amount, @@ -218,6 +218,8 @@ class RRTRequestPageState extends State { fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ), @@ -242,7 +244,7 @@ class RRTRequestPageState extends State { Expanded( child: Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 12, height: 12), + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( vat, @@ -252,6 +254,8 @@ class RRTRequestPageState extends State { fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ), @@ -276,17 +280,14 @@ class RRTRequestPageState extends State { Expanded( child: Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 14, height: 14), + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 14, height: 14), mWidth(6), Text( total, - style: TextStyle( - fontSize: 14, - letterSpacing: -0.48, - fontWeight: FontWeight.bold, - color: CustomColors.black - ), + style: TextStyle(fontSize: 14, letterSpacing: -0.48, fontWeight: FontWeight.bold, color: CustomColors.black), ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ), diff --git a/lib/pages/livecare/live_care_payment_page.dart b/lib/pages/livecare/live_care_payment_page.dart index c9e1f889..79c5db55 100644 --- a/lib/pages/livecare/live_care_payment_page.dart +++ b/lib/pages/livecare/live_care_payment_page.dart @@ -136,7 +136,7 @@ class _LiveCarePatmentPageState extends State { child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR") ? Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( widget.getERAppointmentFeesList.amount!, @@ -146,6 +146,8 @@ class _LiveCarePatmentPageState extends State { fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ) : Text( @@ -179,7 +181,7 @@ class _LiveCarePatmentPageState extends State { child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR") ? Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( widget.getERAppointmentFeesList.tax!, @@ -189,6 +191,8 @@ class _LiveCarePatmentPageState extends State { fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ) : Text( @@ -222,7 +226,7 @@ class _LiveCarePatmentPageState extends State { child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR") ? Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( widget.getERAppointmentFeesList.total!, @@ -232,6 +236,8 @@ class _LiveCarePatmentPageState extends State { fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ) : Text( diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index ca46b5cb..70ff4821 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -152,7 +152,7 @@ class _ConfirmPaymentPageState extends State { ), Row( children: [ - widget.advanceModel!.hospitalsModel!.projectOutSA! ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 20, height: 20), + widget.advanceModel!.hospitalsModel!.projectOutSA! ? Container() : projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 20, height: 20), mWidth(6), Text( widget.advanceModel!.hospitalsModel!.projectOutSA! ? '${widget.advanceModel!.amount} ' + TranslationBase.of(context).aed : '${widget.advanceModel!.amount}', @@ -163,6 +163,8 @@ class _ConfirmPaymentPageState extends State { letterSpacing: -0.48, ), ), + mWidth(6), + widget.advanceModel!.hospitalsModel!.projectOutSA! ? Container() : projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 20, height: 20) : Container(), ], ) ], diff --git a/lib/pages/medical/balance/my_balance_page.dart b/lib/pages/medical/balance/my_balance_page.dart index 25f22797..dc664cf8 100644 --- a/lib/pages/medical/balance/my_balance_page.dart +++ b/lib/pages/medical/balance/my_balance_page.dart @@ -100,12 +100,14 @@ class MyBalancePage extends StatelessWidget { children: [ projectViewModel.user!.outSA == 1 ? Container() - : SvgPicture.asset( - "assets/images/new/Saudi_Riyal_Symbol.svg", - width: 22, - height: 22, - color: Colors.white, - ), + : projectViewModel.isArabic + ? Container() + : SvgPicture.asset( + "assets/images/new/Saudi_Riyal_Symbol.svg", + width: 22, + height: 22, + color: Colors.white, + ), mWidth(6), Text( double.parse(model.totalAdvanceBalanceAmount?.toString() ?? "0").toStringAsFixed(2), @@ -113,10 +115,19 @@ class MyBalancePage extends StatelessWidget { fontSize: 24, fontWeight: FontWeight.bold, letterSpacing: -1.44, - height: 24 / 23, + height: 24 / 21, color: Colors.white, ), ), + mWidth(6), + projectViewModel.isArabic + ? SvgPicture.asset( + "assets/images/new/Saudi_Riyal_Symbol.svg", + width: 22, + height: 22, + color: Colors.white, + ) + : Container(), ], ), Text( @@ -174,11 +185,9 @@ class MyBalancePage extends StatelessWidget { children: [ projectViewModel.user!.outSA == 1 ? Container() - : Row( - children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), - ], - ), + : projectViewModel.isArabic + ? Container() + : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( amount.toStringAsFixed(2) + " " + (projectViewModel.user!.outSA == 1 ? TranslationBase.of(context).aed : ""), @@ -189,6 +198,8 @@ class MyBalancePage extends StatelessWidget { color: Color(0xff2E303A), ), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ], diff --git a/pubspec.yaml b/pubspec.yaml index 4ece3714..965a0d56 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.6.004+1 +version: 4.6.005+1 environment: sdk: ">=3.0.0 <3.13.0" From c2785c5f68204898bb1fe1a928eab021edb66014 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 12 Mar 2025 15:22:23 +0300 Subject: [PATCH 08/10] Updates & fixes --- .../components/SearchByClinic.dart | 2 +- lib/pages/landing/landing_page.dart | 2 +- .../clinic_services/get_clinic_service.dart | 2 +- lib/uitl/location_util.dart | 18 ++++++++++++------ .../bottom_navigation_item.dart | 8 +++++--- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 158f2c49..cab8e507 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -70,7 +70,7 @@ class _SearchByClinicState extends State { @override void initState() { - locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + locationUtils = new LocationUtils(isShowConfirmDialog: true, isShowLocationTimeoutDialog: false, context: context); WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList()); checkPVM(); super.initState(); diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 05d90571..b58921a6 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -663,7 +663,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { setState(() { if (value != null) { notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); - model.setState(model.count, 0, true, notificationCount); + model.setState(model.count, model.ancillaryCount, true, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount); // FlutterAppIconBadge.updateBadge(int.parse(notificationCount)); } diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index e1bda009..4737756c 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -429,7 +429,7 @@ class ClinicListService extends BaseService { localRes = response; }, onFailure: (String error, int statusCode) { throw error; - }, body: request); + }, body: request, isAllowAny: true); return Future.value(localRes); } diff --git a/lib/uitl/location_util.dart b/lib/uitl/location_util.dart index 90119490..17ccd145 100644 --- a/lib/uitl/location_util.dart +++ b/lib/uitl/location_util.dart @@ -18,11 +18,12 @@ class LocationUtils { AppSharedPreferences sharedPref = new AppSharedPreferences(); bool isShowConfirmDialog; + bool isShowLocationTimeoutDialog; BuildContext context; bool isHuawei; final GeolocatorPlatform _geolocatorPlatform = GeolocatorPlatform.instance; - LocationUtils({required this.isShowConfirmDialog, required this.context, this.isHuawei = false}); + LocationUtils({required this.isShowConfirmDialog, required this.context, this.isHuawei = false, this.isShowLocationTimeoutDialog = true}); void getCurrentLocation({Function(LatLng)? callBack}) async { if (Platform.isAndroid && isHuawei) { @@ -32,12 +33,15 @@ class LocationUtils { if (value) { await Geolocator.checkPermission().then((permission) async { if (permission == LocationPermission.always || permission == LocationPermission.whileInUse) { - Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.best, timeLimit: Duration(seconds: 5)).then((value) { + Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 5)).then((value) { setLocation(value); if (callBack != null) callBack(LatLng(value.latitude, value.longitude)); }).catchError((err) { print(err); - if (isShowConfirmDialog) showLocationTimeOutDialog(failureCallBack: (){}); + if (isShowConfirmDialog && isShowLocationTimeoutDialog) + showLocationTimeOutDialog(failureCallBack: () { + Geolocator.openAppSettings(); + }); }); } @@ -51,7 +55,7 @@ class LocationUtils { if (callBack != null) callBack(LatLng(value.latitude, value.longitude)); }); } else { - if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: (){}); + if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: () {}); } }); } else { @@ -59,7 +63,7 @@ class LocationUtils { getCurrentLocation(callBack: callBack); } else { setZeroLocation(); - if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: (){}); + if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: () {}); } } } @@ -130,7 +134,9 @@ class LocationUtils { accuracy: 1.0, heading: 0.0, speed: 0.0, - speedAccuracy: 1, altitudeAccuracy: 0.0, headingAccuracy: 0.0, + speedAccuracy: 1, + altitudeAccuracy: 0.0, + headingAccuracy: 0.0, // altitudeAccuracy: 0.0, // headingAccuracy: 0.0, // altitudeAccuracy: 0, diff --git a/lib/widgets/bottom_navigation/bottom_navigation_item.dart b/lib/widgets/bottom_navigation/bottom_navigation_item.dart index 00d3700b..22c27384 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation_item.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation_item.dart @@ -20,13 +20,15 @@ class BottomNavigationItem extends StatelessWidget { final String? name; final bool? isDisabled; + late ToDoCountProviderModel toDoProvider; + AuthenticatedUserObject authenticatedUserObject = locator(); BottomNavigationItem({this.icon, this.activeIcon, this.changeIndex, this.index, this.currentIndex, this.name, this.isDisabled = false}); @override Widget build(BuildContext context) { - var model = Provider.of(context); + toDoProvider = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context); return Expanded( child: SizedBox( @@ -72,7 +74,7 @@ class BottomNavigationItem extends StatelessWidget { ), ], ) - : (authenticatedUserObject.isLogin && model.isShowBadge) + : (authenticatedUserObject.isLogin && toDoProvider.isShowBadge) ? Stack( alignment: AlignmentDirectional.center, children: [ @@ -120,7 +122,7 @@ class BottomNavigationItem extends StatelessWidget { // borderRadius: BorderRadius.circular(8), badgeContent: Container( padding: EdgeInsets.all(2.0), - child: Text((model.count! + model.ancillaryCount!).toString(), style: TextStyle(color: Colors.white, fontSize: 14.0)), + child: Text((toDoProvider.count! + toDoProvider.ancillaryCount!).toString(), style: TextStyle(color: Colors.white, fontSize: 14.0)), ), ), ), From 91b9e792c69ccc7ae5fce19b0181fe54e7e3bf9b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 12 Mar 2025 15:36:56 +0300 Subject: [PATCH 09/10] updates --- android/build.gradle | 1 + pubspec.yaml | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 69a65d6a..1849765a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -37,6 +37,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.1.3' +// classpath 'com.android.tools.build:gradle:8.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.3.8' // classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' diff --git a/pubspec.yaml b/pubspec.yaml index 965a0d56..cececbe0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.6.005+1 +version: 4.6.085+4050085 environment: sdk: ">=3.0.0 <3.13.0" @@ -60,7 +60,9 @@ dependencies: local_auth: ^2.1.7 localstorage: ^4.0.0+1 maps_launcher: ^2.0.1 - url_launcher: ^6.0.15 +# url_launcher: ^6.0.15 + url_launcher: ^6.3.1 + url_launcher_ios: ^6.3.2 shared_preferences: ^2.0.0 # flutter_flexible_toast: ^0.1.4 fluttertoast: ^8.0.8 @@ -97,7 +99,7 @@ dependencies: # Qr code Scanner TODO fix it location: ^5.0.3 - barcode_scan2: ^4.2.2 + barcode_scan2: 4.3.2 # Rating Stars flutter_rating_bar: ^4.0.1 @@ -187,6 +189,7 @@ dependencies: firebase_crashlytics: ^3.0.0 cloudflare_turnstile: ^2.0.1 + device_info_plus: ^10.1.2 # vital_sign_camera: # path: ./packages/vital_sign_camera From 21fda7987ab689f0223430b968818feed97a8470 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 16 Mar 2025 12:20:15 +0300 Subject: [PATCH 10/10] Updates & fixes, App uploaded to Stores VersionID 17.9 --- lib/config/config.dart | 2 +- .../ancillary-orders/ancillaryOrdersDetails.dart | 3 ++- lib/pages/MyAppointments/AppointmentDetails.dart | 2 +- lib/pages/livecare/widgets/clinic_list.dart | 4 ++-- lib/services/payfort_services/payfort_view_model.dart | 4 +++- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 5790d43b..25c4bf73 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -353,7 +353,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 17.8; +var VERSION_ID = 17.9; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index 61d621cd..464786df 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -328,7 +328,8 @@ class _AnicllaryOrdersState extends State with SingleTic ), mWidth(3), Text( - _ancillaryProcLists[0].ancillaryOrderProcDetailsList![0].orderNo.toString(), + // _ancillaryProcLists[0].ancillaryOrderProcDetailsList![0].orderNo.toString(), + _ancillaryProcLists[0].ancillaryOrderProcDetailsList!.isNotEmpty ? _ancillaryProcLists[0].ancillaryOrderProcDetailsList![0].orderNo.toString() : "0", style: TextStyle( fontWeight: FontWeight.w600, fontSize: 12, diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index 2744c56f..4a3334cd 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -214,7 +214,7 @@ class _AppointmentDetailsState extends State with SingleTick return SizedBox(); } else { List list = []; - if (widget.parentIndex == 0 && _tabController!.index == 0) { + if (widget.parentIndex == 0 && _tabController!.index == 0 && widget.appo.patientStatusType != 43) { list.add( Expanded( child: DefaultButton( diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index b0a5df48..c4b825dc 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -501,12 +501,12 @@ class _clinic_listState extends State { ); } else { GifLoaderDialogUtils.hideDialog(context); - AppToast.showErrorToast(message: "An error occurred while processing your request"); + AppToast.showErrorToast(message: "An error occurred while processing your request", localContext: context); } }).catchError((err) { print(err); GifLoaderDialogUtils.hideDialog(localContext!); - AppToast.showErrorToast(message: err); + AppToast.showErrorToast(message: err, localContext: context); }); } catch (ex) { print(ex.toString()); diff --git a/lib/services/payfort_services/payfort_view_model.dart b/lib/services/payfort_services/payfort_view_model.dart index 29a79f14..2ba62fc2 100644 --- a/lib/services/payfort_services/payfort_view_model.dart +++ b/lib/services/payfort_services/payfort_view_model.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/enum/PayfortEnums.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/services/payfort_services/payfort_project_details_resp_model.dart'; import 'package:diplomaticquarterapp/services/payfort_services/payfort_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:flutter/cupertino.dart'; @@ -77,7 +78,8 @@ class PayfortViewModel extends ChangeNotifier { ); GifLoaderDialogUtils.hideDialog(AppGlobal.context); } catch (e) { - Utils.showErrorToast(e.toString()); + // Utils.showErrorToast(e.toString()); + AppToast.showErrorToast(message: e.toString(), localContext: AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context); throw e; }