haroon_dev
Haroon Amjad 14 hours ago
parent 08928ddd28
commit 55b8bc162c

@ -448,7 +448,7 @@
"lakumPoint": "نقطة",
"wishlist": "قائمة الرغبات",
"products": "المنتجات",
"reviews": "التقييمات",
"reviews": "التعليقات",
"brands": "العلامات التجارية",
"productDetails": "تفاصيل المنتج",
"medicationRefill": "إعادة تعبئة الدواء",
@ -1584,5 +1584,6 @@
"timeFor": "الوقت",
"hmgPolicies": "سياسات مجموعة الحبيب الطبية",
"darkMode": "المظهر الداكن",
"generateAiAnalysisResult": "قم بإجراء تحليل لهذا المختبر AI"
"generateAiAnalysisResult": "قم بإجراء تحليل لهذا المختبر AI",
"ratings": "التقييمات"
}

@ -1577,5 +1577,6 @@
"timeFor": "Time For",
"hmgPolicies": "HMG Policies",
"darkMode": "Dark Mode",
"generateAiAnalysisResult": "Generate AI analysis for this result"
"generateAiAnalysisResult": "Generate AI analysis for this result",
"ratings": "Ratings"
}

File diff suppressed because it is too large Load Diff

@ -234,6 +234,7 @@ class ApiConsts {
// ************ static values for Api ****************
static final double appVersionID = 20.3;
// static final double appVersionID = 50.7;
static final int appChannelId = 3;
static final String appIpAddress = "10.20.10.20";
@ -777,8 +778,7 @@ var GET_CUSTOMER_INFO = "VerifyCustomer";
//Pharmacy
var GET_PHARMACY_CATEGORISE =
'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0';
var GET_PHARMACY_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0';
var GET_OFFERS_CATEGORISE = 'discountcategories';
var GET_OFFERS_PRODUCTS = 'offerproducts/';
var GET_CATEGORISE_PARENT = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=';

@ -258,12 +258,12 @@ extension EmailValidator on String {
style: TextStyle(color: color ?? AppColors.blackColor, fontSize: 17.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, fontFamily: isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
);
Widget toText18({Color? color, FontWeight? weight, bool isBold = false, bool isCenter = false, int? maxlines, TextOverflow? textOverflow}) => Text(
Widget toText18({Color? color, FontWeight? weight, bool isBold = false, bool isCenter = false, int? maxlines, TextOverflow? textOverflow, bool isEnglishOnly = false,}) => Text(
maxLines: maxlines,
textAlign: isCenter ? TextAlign.center : null,
this,
overflow: textOverflow,
style: TextStyle(fontSize: 18.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), color: color ?? AppColors.blackColor, letterSpacing: -0.4),
style: TextStyle(fontSize: 18.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), color: color ?? AppColors.blackColor, letterSpacing: -0.4, fontFamily: (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),),
);
Widget toText19({Color? color, bool isBold = false}) => Text(

@ -536,6 +536,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
clearSearchFilters();
getFiltersFromDoctorList();
_groupDoctorsList();
setIsNearestAppointmentSelected(true);
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);

@ -1578,5 +1578,6 @@ abstract class LocaleKeys {
static const hmgPolicies = 'hmgPolicies';
static const darkMode = 'darkMode';
static const generateAiAnalysisResult = 'generateAiAnalysisResult';
static const ratings = 'ratings';
}

@ -161,9 +161,13 @@ class AppointmentCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
(isLoading ? 'John Doe' : "${patientAppointmentHistoryResponseModel.doctorTitle} ${patientAppointmentHistoryResponseModel.doctorNameObj!}")
.toText16(isBold: true, maxlines: 1)
.toShimmer2(isShow: isLoading),
Row(
children: [
(isLoading ? 'Dr' : "${patientAppointmentHistoryResponseModel.doctorTitle}").toText16(isBold: true, maxlines: 1),
(isLoading ? 'John Doe' : " ${patientAppointmentHistoryResponseModel.doctorNameObj!.truncate(20)}")
.toText16(isBold: true, maxlines: 1, isEnglishOnly: !Utils.isArabicText(patientAppointmentHistoryResponseModel.doctorNameObj ?? "John Doe"))
],
).toShimmer2(isShow: isLoading),
SizedBox(height: 8.h),
Wrap(
direction: Axis.horizontal,

@ -16,11 +16,7 @@ import 'dart:ui' as ui;
class AppointmentDoctorCard extends StatelessWidget {
const AppointmentDoctorCard(
{super.key,
required this.patientAppointmentHistoryResponseModel,
required this.onRescheduleTap,
required this.onCancelTap,
required this.onAskDoctorTap, this.renderWidgetForERDisplay = false});
{super.key, required this.patientAppointmentHistoryResponseModel, required this.onRescheduleTap, required this.onCancelTap, required this.onAskDoctorTap, this.renderWidgetForERDisplay = false});
final PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel;
final VoidCallback onRescheduleTap;
@ -82,7 +78,7 @@ class AppointmentDoctorCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
patientAppointmentHistoryResponseModel.doctorNameObj!.toText16(isBold: true),
patientAppointmentHistoryResponseModel.doctorNameObj!.toText16(isBold: true, isEnglishOnly: !Utils.isArabicText(patientAppointmentHistoryResponseModel.doctorNameObj ?? "")),
SizedBox(height: 8.h),
Wrap(
direction: Axis.horizontal,
@ -107,20 +103,16 @@ class AppointmentDoctorCard extends StatelessWidget {
richText: "${DateUtil.formatDateToDate(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false)} ${DateUtil.formatDateToTimeLang(
DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate),
false,
)}".toText10(isEnglishOnly: true),
)}"
.toText10(isEnglishOnly: true),
),
),
AppCustomChipWidget(
labelPadding: EdgeInsetsDirectional.only(start: -6.w, end: 6.w),
icon: !patientAppointmentHistoryResponseModel.isLiveCareAppointment!
? AppAssets.walkin_appointment_icon
: AppAssets.small_livecare_icon,
icon: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppAssets.walkin_appointment_icon : AppAssets.small_livecare_icon,
iconColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : Colors.white,
labelText: patientAppointmentHistoryResponseModel.isLiveCareAppointment!
? LocaleKeys.livecare.tr(context: context)
: LocaleKeys.walkin.tr(context: context),
backgroundColor:
!patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.greyColor : AppColors.successColor,
labelText: patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? LocaleKeys.livecare.tr(context: context) : LocaleKeys.walkin.tr(context: context),
backgroundColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.greyColor : AppColors.successColor,
textColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : Colors.white,
),
],
@ -166,20 +158,20 @@ class AppointmentDoctorCard extends StatelessWidget {
: !patientAppointmentHistoryResponseModel.isLiveCareAppointment!
? CustomButton(
text: LocaleKeys.rebookSameDoctor.tr(),
onPressed: () {
onRescheduleTap();
},
backgroundColor: AppColors.greyColor,
borderColor: AppColors.greyColor,
textColor: AppColors.blackColor,
fontSize: 12.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
padding: EdgeInsets.fromLTRB(10.w, 0, 10.w, 0),
height: 40.h,
icon: AppAssets.rebook_appointment_icon,
iconColor: AppColors.blackColor,
iconSize: 14.h,
onPressed: () {
onRescheduleTap();
},
backgroundColor: AppColors.greyColor,
borderColor: AppColors.greyColor,
textColor: AppColors.blackColor,
fontSize: 12.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
padding: EdgeInsets.fromLTRB(10.w, 0, 10.w, 0),
height: 40.h,
icon: AppAssets.rebook_appointment_icon,
iconColor: AppColors.blackColor,
iconSize: 14.h,
)
: SizedBox.shrink();
} else {

@ -102,7 +102,7 @@ class DoctorProfilePage extends StatelessWidget {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.doctor_profile_rating_icon, width: 48.w, height: 48.h, fit: BoxFit.contain, applyThemeColor: false),
SizedBox(height: 16.h),
"Ratings".toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
LocaleKeys.ratings.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
bookAppointmentsViewModel.doctorsProfileResponseModel.decimalDoctorRate
.toString()
.toText16(isBold: true, color: AppColors.textColor, isUnderLine: true, decorationColor: AppColors.textColor, fontFamily: "Poppins"),
@ -123,7 +123,7 @@ class DoctorProfilePage extends StatelessWidget {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.doctor_profile_reviews_icon, width: 48.w, height: 48.h, fit: BoxFit.contain, applyThemeColor: false),
SizedBox(height: 16.h),
"Reviews".toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
LocaleKeys.reviews.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
bookAppointmentsViewModel.doctorsProfileResponseModel.noOfPatientsRate
.toString()
.toText16(isBold: true, color: AppColors.textColor, isUnderLine: true, decorationColor: AppColors.textColor, fontFamily: "Poppins"),

@ -46,7 +46,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
void initState() {
_scrollController = ScrollController();
scheduleMicrotask(() {
bookAppointmentsViewModel.setIsNearestAppointmentSelected(false);
bookAppointmentsViewModel.setIsNearestAppointmentSelected(true);
if (bookAppointmentsViewModel.isLiveCareSchedule) {
bookAppointmentsViewModel.getLiveCareDoctorsList();
} else {

@ -90,59 +90,64 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
// ),
SizedBox(
height: 350.h,
child: SfCalendar(
controller: _calendarController,
minDate: DateTime.now(),
showNavigationArrow: true,
headerHeight: 60.h,
headerStyle: CalendarHeaderStyle(
backgroundColor: AppColors.scaffoldBgColor,
textAlign: TextAlign.start,
textStyle: TextStyle(fontSize: 18.f, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: AppColors.primaryRedColor, fontFamily: "Poppins"),
),
viewHeaderStyle: ViewHeaderStyle(
backgroundColor: AppColors.scaffoldBgColor,
dayTextStyle: TextStyle(fontSize: 14.f, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: AppColors.textColor),
),
view: CalendarView.month,
todayHighlightColor: Colors.transparent,
todayTextStyle: TextStyle(color: AppColors.textColor, fontWeight: FontWeight.bold),
selectionDecoration: ShapeDecoration(
color: AppColors.transparent,
shape: SmoothRectangleBorder(
borderRadius: BorderRadius.circular(10.r),
smoothness: 1,
side: BorderSide(color: AppColors.primaryRedColor, width: 1.5),
child: Localizations.override(
context: context,
locale: const Locale('en'),
child: SfCalendar(
controller: _calendarController,
minDate: DateTime.now(),
showNavigationArrow: true,
headerHeight: 60.h,
headerStyle: CalendarHeaderStyle(
backgroundColor: AppColors.scaffoldBgColor,
textAlign: TextAlign.start,
textStyle: TextStyle(fontSize: 18.f, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: AppColors.primaryRedColor, fontFamily: "Poppins"),
),
),
cellBorderColor: AppColors.transparent,
dataSource: MeetingDataSource(_getDataSource()),
monthCellBuilder: (context, details) => Padding(
padding: EdgeInsets.all(12.h),
child: details.date.day.toString().toText14(
isCenter: true,
color: details.date == _calendarController.selectedDate ? AppColors.primaryRedColor : AppColors.textColor,
),
),
monthViewSettings: MonthViewSettings(
dayFormat: "EEE",
appointmentDisplayMode: MonthAppointmentDisplayMode.indicator,
showTrailingAndLeadingDates: false,
appointmentDisplayCount: 1,
monthCellStyle: MonthCellStyle(
textStyle: TextStyle(fontSize: 19.f),
viewHeaderStyle: ViewHeaderStyle(
backgroundColor: AppColors.scaffoldBgColor,
dayTextStyle: TextStyle(fontSize: 14.f, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: AppColors.textColor, fontFamily: "Poppins"),
),
view: CalendarView.month,
todayHighlightColor: Colors.transparent,
todayTextStyle: TextStyle(color: AppColors.textColor, fontWeight: FontWeight.bold, fontFamily: "Poppins"),
selectionDecoration: ShapeDecoration(
color: AppColors.transparent,
shape: SmoothRectangleBorder(
borderRadius: BorderRadius.circular(10.r),
smoothness: 1,
side: BorderSide(color: AppColors.primaryRedColor, width: 1.5),
),
),
cellBorderColor: AppColors.transparent,
dataSource: MeetingDataSource(_getDataSource()),
monthCellBuilder: (context, details) => Padding(
padding: EdgeInsets.all(12.h),
child: details.date.day.toString().toText14(
isCenter: true,
color: details.date == _calendarController.selectedDate ? AppColors.primaryRedColor : AppColors.textColor,
isEnglishOnly: true,
),
),
monthViewSettings: MonthViewSettings(
dayFormat: "EEE",
appointmentDisplayMode: MonthAppointmentDisplayMode.indicator,
showTrailingAndLeadingDates: false,
appointmentDisplayCount: 1,
monthCellStyle: MonthCellStyle(
textStyle: TextStyle(fontSize: 19.f),
),
),
onTap: (CalendarTapDetails details) {
_calendarController.selectedDate = details.date;
_onDaySelected(details.date!);
},
),
onTap: (CalendarTapDetails details) {
_calendarController.selectedDate = details.date;
_onDaySelected(details.date!);
},
),
),
SizedBox(height: 10.h),
Transform.translate(
offset: const Offset(0.0, -10.0),
child: selectedDateDisplay.toText16(weight: FontWeight.w500),
child: selectedDateDisplay.toText16(weight: FontWeight.w500, isEnglishOnly: true),
),
//TODO: Add Next Day Span here
dayEvents.isNotEmpty
@ -153,23 +158,23 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.start,
spacing: 6.h,
runSpacing: 6.h,
children: List.generate(
dayEvents.length, // Generate a large number of items to ensure scrolling
(index) => TimeSlotChip(
label: dayEvents[index].isoTime!,
isSelected: index == selectedButtonIndex,
onTap: () {
setState(() {
selectedButtonIndex = index;
selectedTime = dayEvents[index].isoTime!;
});
},
spacing: 6.h,
runSpacing: 6.h,
children: List.generate(
dayEvents.length, // Generate a large number of items to ensure scrolling
(index) => TimeSlotChip(
label: dayEvents[index].isoTime!,
isSelected: index == selectedButtonIndex,
onTap: () {
setState(() {
selectedButtonIndex = index;
selectedTime = dayEvents[index].isoTime!;
});
},
),
),
),
),
),
),
),
)
: Utils.getNoDataWidget(context, noDataText: LocaleKeys.noFreeSlot.tr(context: context)),
@ -179,7 +184,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
isDisabled: dayEvents.isEmpty,
onPressed: () async {
if (appState.isAuthenticated) {
if(selectedTime == LocaleKeys.waitingAppointment.tr(context: context)){
if (selectedTime == LocaleKeys.waitingAppointment.tr(context: context)) {
bookAppointmentsViewModel.setWaitingAppointmentProjectID(bookAppointmentsViewModel.selectedDoctor.projectID!);
bookAppointmentsViewModel.setWaitingAppointmentDoctor(bookAppointmentsViewModel.selectedDoctor);
@ -351,26 +356,20 @@ class TimeSlotChip extends StatelessWidget {
side: BorderSide(color: isSelected ? AppColors.warningColorYellow : AppColors.borderOnlyColor.withOpacity(0.2), width: 1),
),
),
child: label.toText12(
color: isSelected ? AppColors.whiteColor : Colors.black87,
fontWeight: FontWeight.w500,
),
child: label.toText12(color: isSelected ? AppColors.whiteColor : Colors.black87, fontWeight: FontWeight.w500, isEnglishOnly: true),
)
: Container(
padding: EdgeInsets.symmetric(horizontal: 14.h, vertical: 8.h),
decoration: ShapeDecoration(
color: AppColors.whiteColor,
shape: SmoothRectangleBorder(
borderRadius: BorderRadius.circular(8.h),
smoothness: 1,
side: BorderSide(color: isSelected ? AppColors.primaryRedColor : AppColors.borderOnlyColor.withOpacity(0.2), width: 1),
),
),
child: label.toText12(
color: isSelected ? AppColors.primaryRedColor : AppColors.textColor,
fontWeight: FontWeight.w500,
),
),
color: AppColors.whiteColor,
shape: SmoothRectangleBorder(
borderRadius: BorderRadius.circular(8.h),
smoothness: 1,
side: BorderSide(color: isSelected ? AppColors.primaryRedColor : AppColors.borderOnlyColor.withOpacity(0.2), width: 1),
),
),
child: label.toText12(color: isSelected ? AppColors.primaryRedColor : AppColors.textColor, fontWeight: FontWeight.w500, isEnglishOnly: true),
),
);
}
}

@ -109,7 +109,7 @@ class DoctorCard extends StatelessWidget {
: doctorsListResponseModel.speciality!.first)
: "")
.toString()
.toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor, maxLine: 2)
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColor, maxLine: 2, isEnglishOnly: true)
.toShimmer2(isShow: isLoading),
),
SizedBox(width: 6.w),

@ -39,7 +39,7 @@ class WelcomeWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Flexible(child: name.toText16(weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1, height: 1)),
Flexible(child: name.toText16(weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1, height: 1, isEnglishOnly: true)),
Icon(Icons.keyboard_arrow_down, size: 20, color: AppColors.greyTextColor),
],
),

@ -52,7 +52,7 @@ class PatientInsuranceCard extends StatelessWidget {
children: [
SizedBox(
width: MediaQuery.of(context).size.width * 0.4,
child: "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText18(isBold: true, textOverflow: TextOverflow.clip)),
child: "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText18(isBold: true, textOverflow: TextOverflow.clip, isEnglishOnly: true)),
LocaleKeys.policyNumber.tr(namedArgs: {'number': insuranceCardDetailsModel.insurancePolicyNo ?? ''}, context: context).toText12(isBold: true, color: AppColors.lightGrayColor),
],
),

File diff suppressed because one or more lines are too long

@ -85,6 +85,8 @@ import '../../features/active_prescriptions/active_prescriptions_view_model.dart
import '../prescriptions/prescription_detail_page.dart';
import 'widgets/medical_file_appointment_card.dart';
import 'dart:ui' as ui;
class MedicalFilePage extends StatefulWidget {
bool showBackIcon;
@ -784,11 +786,15 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
runSpacing: 4.w,
children: [
AppCustomChipWidget(labelText: prescriptionVM.patientPrescriptionOrders[index].clinicDescription!),
AppCustomChipWidget(
icon: AppAssets.doctor_calendar_icon,
labelText: DateUtil.formatDateToDate(
DateUtil.convertStringToDate(prescriptionVM.patientPrescriptionOrders[index].appointmentDate),
false,
Directionality(
textDirection: ui.TextDirection.ltr,
child: AppCustomChipWidget(
icon: AppAssets.doctor_calendar_icon,
labelText: DateUtil.formatDateToDate(
DateUtil.convertStringToDate(prescriptionVM.patientPrescriptionOrders[index].appointmentDate),
false,
),
isEnglishOnly: true,
),
),
],

@ -74,7 +74,7 @@ class MedicalFileAppointmentCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
(patientAppointmentHistoryResponseModel.doctorNameObj ?? "").toText14(isBold: true, maxlines: 1).toShimmer2(isShow: myAppointmentsViewModel.isMyAppointmentsLoading),
(patientAppointmentHistoryResponseModel.doctorNameObj ?? "").toText14(isBold: true, maxlines: 1, isEnglishOnly: !Utils.isArabicText(patientAppointmentHistoryResponseModel.doctorNameObj ?? "")).toShimmer2(isShow: myAppointmentsViewModel.isMyAppointmentsLoading),
(patientAppointmentHistoryResponseModel.clinicName ?? "")
.toText12(maxLine: 1, fontWeight: FontWeight.w500, color: AppColors.greyTextColor)
.toShimmer2(isShow: myAppointmentsViewModel.isMyAppointmentsLoading),

@ -23,6 +23,8 @@ import 'package:open_filex/open_filex.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'dart:ui' as ui;
class PrescriptionDetailPage extends StatefulWidget {
PrescriptionDetailPage({super.key, required this.prescriptionsResponseModel, required this.isFromAppointments});
@ -124,11 +126,15 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
spacing: 4.h,
runSpacing: 4.h,
children: [
AppCustomChipWidget(
icon: AppAssets.doctor_calendar_icon,
labelText: DateUtil.formatDateToDate(
DateUtil.convertStringToDate(widget.prescriptionsResponseModel.appointmentDate), false),
labelPadding: EdgeInsetsDirectional.only(start: -4.h, end: 8.h),
Directionality(
textDirection: ui.TextDirection.ltr,
child: AppCustomChipWidget(
icon: AppAssets.doctor_calendar_icon,
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.prescriptionsResponseModel.appointmentDate), false),
isEnglishOnly: true
,
labelPadding: EdgeInsetsDirectional.only(start: -4.h, end: 8.h),
),
),
AppCustomChipWidget(
labelText: widget.prescriptionsResponseModel.clinicDescription!,
@ -225,9 +231,7 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
hasShadow: true,
),
child: CustomButton(
text: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported!
? LocaleKeys.resendOrder.tr(context: context)
: LocaleKeys.prescriptionDeliveryError.tr(context: context),
text: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? LocaleKeys.resendOrder.tr(context: context) : LocaleKeys.prescriptionDeliveryError.tr(context: context),
onPressed: () async {
if (widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported!) {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingPrescriptionDetails.tr(context: context));
@ -239,16 +243,14 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
},
backgroundColor: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? AppColors.successColor : AppColors.greyF7Color,
borderColor: AppColors.successColor.withOpacity(0.01),
textColor:
widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? Colors.white : AppColors.textColor.withOpacity(0.35),
textColor: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? Colors.white : AppColors.textColor.withOpacity(0.35),
fontSize: 16,
fontWeight: FontWeight.w500,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,
icon: AppAssets.prescription_refill_icon,
iconColor:
widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? Colors.white : AppColors.textColor.withOpacity(0.35),
iconColor: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? Colors.white : AppColors.textColor.withOpacity(0.35),
iconSize: 20.h,
).paddingSymmetrical(24.h, 24.h),
),

@ -47,7 +47,7 @@ class PrescriptionItemView extends StatelessWidget {
fit: BoxFit.fill,
).toShimmer2(isShow: isLoading).circle(100),
Expanded(
child: (isLoading ? "" : prescriptionVM.prescriptionDetailsList[index].itemDescription!).toText16(isBold: true, maxlines: 2).toShimmer2(isShow: isLoading),
child: (isLoading ? "" : prescriptionVM.prescriptionDetailsList[index].itemDescription!).toText16(isBold: true, maxlines: 2, isEnglishOnly: true).toShimmer2(isShow: isLoading),
),
],
).paddingSymmetrical(16.h, 0.h),
@ -78,7 +78,9 @@ class PrescriptionItemView extends StatelessWidget {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.prescription_remarks_icon, width: 18.h, height: 18.h),
SizedBox(width: 9.h),
Expanded(child: "${LocaleKeys.remarks.tr(context: context)}: ${isLoading ? "" : prescriptionVM.prescriptionDetailsList[index].remarks!}".toText10(isBold: true)),
Expanded(
child: "${LocaleKeys.remarks.tr(context: context)} ${isLoading ? "" : prescriptionVM.prescriptionDetailsList[index].remarks!}".toText10(isBold: true, isEnglishOnly: true),
),
],
).paddingSymmetrical(16.h, 0.h),
SizedBox(height: 14.h),
@ -95,7 +97,7 @@ class PrescriptionItemView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.setReminder.tr(context: context).toText13(isBold: true),
"Notify me before the consumption time".toText10(color: AppColors.textColorLight),
"Notify me before the consumption time".toText10(color: AppColors.textColorLight, isEnglishOnly: true),
],
).toShimmer2(isShow: isLoading).expanded,
Switch(

@ -24,6 +24,8 @@ import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:provider/provider.dart';
import 'dart:ui' as ui;
class PrescriptionsListPage extends StatefulWidget {
const PrescriptionsListPage({super.key});
@ -213,8 +215,11 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
spacing: 6.h,
runSpacing: 6.h,
children: [
AppCustomChipWidget(
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(prescription.appointmentDate), false),
Directionality(
textDirection: ui.TextDirection.ltr,
child: AppCustomChipWidget(
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(prescription.appointmentDate), false), isEnglishOnly: true,
),
),
AppCustomChipWidget(
labelText: model.isSortByClinic ? prescription.name ?? "" : prescription.clinicDescription!,

@ -378,7 +378,7 @@ class FamilyCardWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
"${profile.patientName}".toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1),
"${profile.patientName}".toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1, isEnglishOnly: true),
AppCustomChipWidget(
icon: AppAssets.file_icon,
labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${profile.responseId}",

@ -24,6 +24,8 @@ import 'package:provider/provider.dart';
import '../../features/radiology/radiology_view_model.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'dart:ui' as ui;
class RadiologyOrdersPage extends StatefulWidget {
const RadiologyOrdersPage({super.key});
@ -289,10 +291,13 @@ class _RadiologyOrdersPageState extends State<RadiologyOrdersPage> {
AppCustomChipWidget(
labelText: (order.description ?? '').toString(),
),
AppCustomChipWidget(
labelText: DateUtil.formatDateToDate(
(order.orderDate ?? order.appointmentDate),
false,
Directionality(
textDirection: ui.TextDirection.ltr,
child: AppCustomChipWidget(
labelText: DateUtil.formatDateToDate(
(order.orderDate ?? order.appointmentDate),
false,
), isEnglishOnly: true,
),
),
AppCustomChipWidget(

@ -20,6 +20,7 @@ import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
import 'package:open_filex/open_filex.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'dart:ui' as ui;
class RadiologyResultPage extends StatefulWidget {
RadiologyResultPage({super.key, required this.patientRadiologyResponseModel});
@ -52,6 +53,14 @@ class _RadiologyResultPageState extends State<RadiologyResultPage> {
Expanded(
child: CollapsingListView(
title: LocaleKeys.radiologyResult.tr(context: context),
viewImage: () {
if (radiologyViewModel.radiologyImageURL.isNotEmpty) {
Uri uri = Uri.parse(radiologyViewModel.radiologyImageURL);
launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: "");
} else {
Utils.showToast("Radiology image not available");
}
},
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.h),
@ -71,31 +80,34 @@ class _RadiologyResultPageState extends State<RadiologyResultPage> {
SizedBox(height: 16.h),
// widget.patientRadiologyResponseModel.description!.toText16(isBold: true),
SizedBox(height: 8.h),
widget.patientRadiologyResponseModel.reportData!.trim().toText12(isBold: true, color: AppColors.textColorLight),
SizedBox(height: 16.h),
CustomButton(
text: LocaleKeys.viewRadiologyImage.tr(context: context),
onPressed: () async {
if (radiologyViewModel.radiologyImageURL.isNotEmpty) {
Uri uri = Uri.parse(radiologyViewModel.radiologyImageURL);
launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: "");
} else {
Utils.showToast("Radiology image not available");
}
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w500,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
icon: AppAssets.download,
iconColor: Colors.white,
iconSize: 20.h,
Directionality(
textDirection: ui.TextDirection.ltr,
child: widget.patientRadiologyResponseModel.reportData!.trim().toText12(isBold: true, color: AppColors.textColorLight, isEnglishOnly: true),
),
SizedBox(height: 16.h),
// CustomButton(
// text: LocaleKeys.viewRadiologyImage.tr(context: context),
// onPressed: () async {
// if (radiologyViewModel.radiologyImageURL.isNotEmpty) {
// Uri uri = Uri.parse(radiologyViewModel.radiologyImageURL);
// launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: "");
// } else {
// Utils.showToast("Radiology image not available");
// }
// },
// backgroundColor: AppColors.primaryRedColor,
// borderColor: AppColors.primaryRedColor,
// textColor: Colors.white,
// fontSize: 14,
// fontWeight: FontWeight.w500,
// borderRadius: 12,
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
// height: 40.h,
// icon: AppAssets.download,
// iconColor: Colors.white,
// iconSize: 20.h,
// ),
// SizedBox(height: 16.h),
],
).paddingSymmetrical(16.h, 0.h),
),
@ -116,16 +128,21 @@ class _RadiologyResultPageState extends State<RadiologyResultPage> {
text: LocaleKeys.downloadReport.tr(context: context),
onPressed: () async {
LoaderBottomSheet.showLoader();
await radiologyViewModel.getRadiologyPDF(patientRadiologyResponseModel: widget.patientRadiologyResponseModel, authenticatedUser: _appState.getAuthenticatedUser()!, onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
}).then((val) async {
await radiologyViewModel
.getRadiologyPDF(
patientRadiologyResponseModel: widget.patientRadiologyResponseModel,
authenticatedUser: _appState.getAuthenticatedUser()!,
onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
})
.then((val) async {
LoaderBottomSheet.hideLoader();
if (radiologyViewModel.patientRadiologyReportPDFBase64.isNotEmpty) {
String path = await Utils.createFileFromString(radiologyViewModel.patientRadiologyReportPDFBase64, "pdf");

@ -26,6 +26,7 @@ class CollapsingListView extends StatelessWidget {
VoidCallback? sendEmail;
VoidCallback? doctorResponse;
VoidCallback? downloadReport;
VoidCallback? viewImage;
Widget? bottomChild;
Widget? trailing;
bool isClose;
@ -49,6 +50,7 @@ class CollapsingListView extends StatelessWidget {
this.sendEmail,
this.doctorResponse,
this.downloadReport,
this.viewImage,
this.isLeading = true,
this.trailing,
this.leadingCallback,
@ -92,6 +94,7 @@ class CollapsingListView extends StatelessWidget {
sendEmail: sendEmail,
doctorResponse: doctorResponse,
downloadReport: downloadReport,
viewImage: viewImage,
bottomChild: bottomChild,
trailing: trailing,
aiOverview: aiOverview,
@ -204,6 +207,7 @@ class ScrollAnimatedTitle extends StatefulWidget implements PreferredSizeWidget
VoidCallback? sendEmail;
VoidCallback? doctorResponse;
VoidCallback? downloadReport;
VoidCallback? viewImage;
Widget? bottomChild;
Widget? trailing;
@ -222,6 +226,7 @@ class ScrollAnimatedTitle extends StatefulWidget implements PreferredSizeWidget
this.sendEmail,
this.doctorResponse,
this.downloadReport,
this.viewImage,
this.bottomChild,
this.trailing,
});
@ -301,6 +306,7 @@ class _ScrollAnimatedTitleState extends State<ScrollAnimatedTitle> {
if (widget.search != null) Utils.buildSvgWithAssets(icon: AppAssets.search_icon).onPress(widget.search!),
if (widget.aiOverview != null) actionButton(context, t, title: LocaleKeys.aiOverView.tr(context: context), icon: AppAssets.aiOverView, isAiButton: true).onPress(widget.aiOverview!),
if (widget.downloadReport != null) actionButton(context, t, title: LocaleKeys.downloadReport.tr(context: context), icon: AppAssets.download).onPress(widget.downloadReport!),
if (widget.viewImage != null) actionButton(context, t, title: LocaleKeys.viewRadiologyImage.tr(context: context), icon: AppAssets.download).onPress(widget.viewImage!),
if (widget.trailing != null) widget.trailing!,
]
],

@ -27,6 +27,7 @@ class AppCustomChipWidget extends StatelessWidget {
this.labelPadding,
this.onDeleteTap,
this.applyThemeColor = true,
this.isEnglishOnly = false
});
final String? labelText;
@ -48,6 +49,7 @@ class AppCustomChipWidget extends StatelessWidget {
final void Function()? onChipTap;
final void Function()? onDeleteTap;
final bool applyThemeColor;
final bool isEnglishOnly;
@override
Widget build(BuildContext context) {
@ -85,7 +87,7 @@ class AppCustomChipWidget extends StatelessWidget {
applyThemeColor: applyThemeColor,
)
: SizedBox.shrink(),
label: richText ?? (labelText?? "").toText10(weight: FontWeight.w500, letterSpacing: 0, color: resolvedTextColor),
label: richText ?? (labelText?? "").toText10(weight: FontWeight.w500, letterSpacing: 0, color: resolvedTextColor, isEnglishOnly: isEnglishOnly),
padding: padding,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
labelPadding: labelPadding ?? EdgeInsetsDirectional.only(end: deleteIcon?.isNotEmpty == true ? 2.w : 8.w),
@ -112,7 +114,7 @@ class AppCustomChipWidget extends StatelessWidget {
)
: Chip(
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
label: richText ?? (labelText?? "").toText10(weight: FontWeight.w500, letterSpacing: 0, color: resolvedTextColor, isCenter: true),
label: richText ?? (labelText?? "").toText10(weight: FontWeight.w500, letterSpacing: 0, color: resolvedTextColor, isCenter: true, isEnglishOnly: isEnglishOnly),
padding: EdgeInsets.zero,
backgroundColor: resolvedBackgroundColor,
shape: shape ??

@ -2,8 +2,8 @@ name: hmg_patient_app_new
description: "New HMG Patient App"
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
#version: 0.0.11+8
version: 0.0.1+9
#version: 0.0.13+10
version: 0.0.1+13
environment:
sdk: ">=3.6.0 <4.0.0"

Loading…
Cancel
Save