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

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

@ -1577,5 +1577,6 @@
"timeFor": "Time For", "timeFor": "Time For",
"hmgPolicies": "HMG Policies", "hmgPolicies": "HMG Policies",
"darkMode": "Dark Mode", "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 values for Api ****************
static final double appVersionID = 20.3; static final double appVersionID = 20.3;
// static final double appVersionID = 50.7; // static final double appVersionID = 50.7;
static final int appChannelId = 3; static final int appChannelId = 3;
static final String appIpAddress = "10.20.10.20"; static final String appIpAddress = "10.20.10.20";
@ -777,8 +778,7 @@ var GET_CUSTOMER_INFO = "VerifyCustomer";
//Pharmacy //Pharmacy
var GET_PHARMACY_CATEGORISE = var GET_PHARMACY_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0';
'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_CATEGORISE = 'discountcategories';
var GET_OFFERS_PRODUCTS = 'offerproducts/'; 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='; 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'), 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, maxLines: maxlines,
textAlign: isCenter ? TextAlign.center : null, textAlign: isCenter ? TextAlign.center : null,
this, this,
overflow: textOverflow, 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( Widget toText19({Color? color, bool isBold = false}) => Text(

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

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

@ -161,9 +161,13 @@ class AppointmentCard extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
(isLoading ? 'John Doe' : "${patientAppointmentHistoryResponseModel.doctorTitle} ${patientAppointmentHistoryResponseModel.doctorNameObj!}") Row(
.toText16(isBold: true, maxlines: 1) children: [
.toShimmer2(isShow: isLoading), (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), SizedBox(height: 8.h),
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,

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

@ -102,7 +102,7 @@ class DoctorProfilePage extends StatelessWidget {
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.doctor_profile_rating_icon, width: 48.w, height: 48.h, fit: BoxFit.contain, applyThemeColor: false), Utils.buildSvgWithAssets(icon: AppAssets.doctor_profile_rating_icon, width: 48.w, height: 48.h, fit: BoxFit.contain, applyThemeColor: false),
SizedBox(height: 16.h), 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 bookAppointmentsViewModel.doctorsProfileResponseModel.decimalDoctorRate
.toString() .toString()
.toText16(isBold: true, color: AppColors.textColor, isUnderLine: true, decorationColor: AppColors.textColor, fontFamily: "Poppins"), .toText16(isBold: true, color: AppColors.textColor, isUnderLine: true, decorationColor: AppColors.textColor, fontFamily: "Poppins"),
@ -123,7 +123,7 @@ class DoctorProfilePage extends StatelessWidget {
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.doctor_profile_reviews_icon, width: 48.w, height: 48.h, fit: BoxFit.contain, applyThemeColor: false), Utils.buildSvgWithAssets(icon: AppAssets.doctor_profile_reviews_icon, width: 48.w, height: 48.h, fit: BoxFit.contain, applyThemeColor: false),
SizedBox(height: 16.h), 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 bookAppointmentsViewModel.doctorsProfileResponseModel.noOfPatientsRate
.toString() .toString()
.toText16(isBold: true, color: AppColors.textColor, isUnderLine: true, decorationColor: AppColors.textColor, fontFamily: "Poppins"), .toText16(isBold: true, color: AppColors.textColor, isUnderLine: true, decorationColor: AppColors.textColor, fontFamily: "Poppins"),

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

@ -90,59 +90,64 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
// ), // ),
SizedBox( SizedBox(
height: 350.h, height: 350.h,
child: SfCalendar( child: Localizations.override(
controller: _calendarController, context: context,
minDate: DateTime.now(), locale: const Locale('en'),
showNavigationArrow: true, child: SfCalendar(
headerHeight: 60.h, controller: _calendarController,
headerStyle: CalendarHeaderStyle( minDate: DateTime.now(),
backgroundColor: AppColors.scaffoldBgColor, showNavigationArrow: true,
textAlign: TextAlign.start, headerHeight: 60.h,
textStyle: TextStyle(fontSize: 18.f, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: AppColors.primaryRedColor, fontFamily: "Poppins"), headerStyle: CalendarHeaderStyle(
), backgroundColor: AppColors.scaffoldBgColor,
viewHeaderStyle: ViewHeaderStyle( textAlign: TextAlign.start,
backgroundColor: AppColors.scaffoldBgColor, textStyle: TextStyle(fontSize: 18.f, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: AppColors.primaryRedColor, fontFamily: "Poppins"),
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),
), ),
), viewHeaderStyle: ViewHeaderStyle(
cellBorderColor: AppColors.transparent, backgroundColor: AppColors.scaffoldBgColor,
dataSource: MeetingDataSource(_getDataSource()), dayTextStyle: TextStyle(fontSize: 14.f, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: AppColors.textColor, fontFamily: "Poppins"),
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),
), ),
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), SizedBox(height: 10.h),
Transform.translate( Transform.translate(
offset: const Offset(0.0, -10.0), 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 //TODO: Add Next Day Span here
dayEvents.isNotEmpty dayEvents.isNotEmpty
@ -153,23 +158,23 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
child: Wrap( child: Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
alignment: WrapAlignment.start, alignment: WrapAlignment.start,
spacing: 6.h, spacing: 6.h,
runSpacing: 6.h, runSpacing: 6.h,
children: List.generate( children: List.generate(
dayEvents.length, // Generate a large number of items to ensure scrolling dayEvents.length, // Generate a large number of items to ensure scrolling
(index) => TimeSlotChip( (index) => TimeSlotChip(
label: dayEvents[index].isoTime!, label: dayEvents[index].isoTime!,
isSelected: index == selectedButtonIndex, isSelected: index == selectedButtonIndex,
onTap: () { onTap: () {
setState(() { setState(() {
selectedButtonIndex = index; selectedButtonIndex = index;
selectedTime = dayEvents[index].isoTime!; selectedTime = dayEvents[index].isoTime!;
}); });
}, },
),
),
),
), ),
),
),
),
) )
: Utils.getNoDataWidget(context, noDataText: LocaleKeys.noFreeSlot.tr(context: context)), : Utils.getNoDataWidget(context, noDataText: LocaleKeys.noFreeSlot.tr(context: context)),
@ -179,7 +184,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
isDisabled: dayEvents.isEmpty, isDisabled: dayEvents.isEmpty,
onPressed: () async { onPressed: () async {
if (appState.isAuthenticated) { if (appState.isAuthenticated) {
if(selectedTime == LocaleKeys.waitingAppointment.tr(context: context)){ if (selectedTime == LocaleKeys.waitingAppointment.tr(context: context)) {
bookAppointmentsViewModel.setWaitingAppointmentProjectID(bookAppointmentsViewModel.selectedDoctor.projectID!); bookAppointmentsViewModel.setWaitingAppointmentProjectID(bookAppointmentsViewModel.selectedDoctor.projectID!);
bookAppointmentsViewModel.setWaitingAppointmentDoctor(bookAppointmentsViewModel.selectedDoctor); 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), side: BorderSide(color: isSelected ? AppColors.warningColorYellow : AppColors.borderOnlyColor.withOpacity(0.2), width: 1),
), ),
), ),
child: label.toText12( child: label.toText12(color: isSelected ? AppColors.whiteColor : Colors.black87, fontWeight: FontWeight.w500, isEnglishOnly: true),
color: isSelected ? AppColors.whiteColor : Colors.black87,
fontWeight: FontWeight.w500,
),
) )
: Container( : Container(
padding: EdgeInsets.symmetric(horizontal: 14.h, vertical: 8.h), padding: EdgeInsets.symmetric(horizontal: 14.h, vertical: 8.h),
decoration: ShapeDecoration( decoration: ShapeDecoration(
color: AppColors.whiteColor, color: AppColors.whiteColor,
shape: SmoothRectangleBorder( shape: SmoothRectangleBorder(
borderRadius: BorderRadius.circular(8.h), borderRadius: BorderRadius.circular(8.h),
smoothness: 1, smoothness: 1,
side: BorderSide(color: isSelected ? AppColors.primaryRedColor : AppColors.borderOnlyColor.withOpacity(0.2), width: 1), side: BorderSide(color: isSelected ? AppColors.primaryRedColor : AppColors.borderOnlyColor.withOpacity(0.2), width: 1),
), ),
), ),
child: label.toText12( child: label.toText12(color: isSelected ? AppColors.primaryRedColor : AppColors.textColor, fontWeight: FontWeight.w500, isEnglishOnly: true),
color: isSelected ? AppColors.primaryRedColor : AppColors.textColor, ),
fontWeight: FontWeight.w500,
),
),
); );
} }
} }

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

@ -39,7 +39,7 @@ class WelcomeWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ 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), Icon(Icons.keyboard_arrow_down, size: 20, color: AppColors.greyTextColor),
], ],
), ),

@ -52,7 +52,7 @@ class PatientInsuranceCard extends StatelessWidget {
children: [ children: [
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * 0.4, 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), 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 '../prescriptions/prescription_detail_page.dart';
import 'widgets/medical_file_appointment_card.dart'; import 'widgets/medical_file_appointment_card.dart';
import 'dart:ui' as ui;
class MedicalFilePage extends StatefulWidget { class MedicalFilePage extends StatefulWidget {
bool showBackIcon; bool showBackIcon;
@ -784,11 +786,15 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
runSpacing: 4.w, runSpacing: 4.w,
children: [ children: [
AppCustomChipWidget(labelText: prescriptionVM.patientPrescriptionOrders[index].clinicDescription!), AppCustomChipWidget(labelText: prescriptionVM.patientPrescriptionOrders[index].clinicDescription!),
AppCustomChipWidget( Directionality(
icon: AppAssets.doctor_calendar_icon, textDirection: ui.TextDirection.ltr,
labelText: DateUtil.formatDateToDate( child: AppCustomChipWidget(
DateUtil.convertStringToDate(prescriptionVM.patientPrescriptionOrders[index].appointmentDate), icon: AppAssets.doctor_calendar_icon,
false, labelText: DateUtil.formatDateToDate(
DateUtil.convertStringToDate(prescriptionVM.patientPrescriptionOrders[index].appointmentDate),
false,
),
isEnglishOnly: true,
), ),
), ),
], ],

@ -74,7 +74,7 @@ class MedicalFileAppointmentCard extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ 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 ?? "") (patientAppointmentHistoryResponseModel.clinicName ?? "")
.toText12(maxLine: 1, fontWeight: FontWeight.w500, color: AppColors.greyTextColor) .toText12(maxLine: 1, fontWeight: FontWeight.w500, color: AppColors.greyTextColor)
.toShimmer2(isShow: myAppointmentsViewModel.isMyAppointmentsLoading), .toShimmer2(isShow: myAppointmentsViewModel.isMyAppointmentsLoading),

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

@ -47,7 +47,7 @@ class PrescriptionItemView extends StatelessWidget {
fit: BoxFit.fill, fit: BoxFit.fill,
).toShimmer2(isShow: isLoading).circle(100), ).toShimmer2(isShow: isLoading).circle(100),
Expanded( 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), ).paddingSymmetrical(16.h, 0.h),
@ -78,7 +78,9 @@ class PrescriptionItemView extends StatelessWidget {
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.prescription_remarks_icon, width: 18.h, height: 18.h), Utils.buildSvgWithAssets(icon: AppAssets.prescription_remarks_icon, width: 18.h, height: 18.h),
SizedBox(width: 9.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), ).paddingSymmetrical(16.h, 0.h),
SizedBox(height: 14.h), SizedBox(height: 14.h),
@ -95,7 +97,7 @@ class PrescriptionItemView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.setReminder.tr(context: context).toText13(isBold: true), 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, ).toShimmer2(isShow: isLoading).expanded,
Switch( 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:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'dart:ui' as ui;
class PrescriptionsListPage extends StatefulWidget { class PrescriptionsListPage extends StatefulWidget {
const PrescriptionsListPage({super.key}); const PrescriptionsListPage({super.key});
@ -213,8 +215,11 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
spacing: 6.h, spacing: 6.h,
runSpacing: 6.h, runSpacing: 6.h,
children: [ children: [
AppCustomChipWidget( Directionality(
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(prescription.appointmentDate), false), textDirection: ui.TextDirection.ltr,
child: AppCustomChipWidget(
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(prescription.appointmentDate), false), isEnglishOnly: true,
),
), ),
AppCustomChipWidget( AppCustomChipWidget(
labelText: model.isSortByClinic ? prescription.name ?? "" : prescription.clinicDescription!, labelText: model.isSortByClinic ? prescription.name ?? "" : prescription.clinicDescription!,

@ -378,7 +378,7 @@ class FamilyCardWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ 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( AppCustomChipWidget(
icon: AppAssets.file_icon, icon: AppAssets.file_icon,
labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${profile.responseId}", 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 '../../features/radiology/radiology_view_model.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'dart:ui' as ui;
class RadiologyOrdersPage extends StatefulWidget { class RadiologyOrdersPage extends StatefulWidget {
const RadiologyOrdersPage({super.key}); const RadiologyOrdersPage({super.key});
@ -289,10 +291,13 @@ class _RadiologyOrdersPageState extends State<RadiologyOrdersPage> {
AppCustomChipWidget( AppCustomChipWidget(
labelText: (order.description ?? '').toString(), labelText: (order.description ?? '').toString(),
), ),
AppCustomChipWidget( Directionality(
labelText: DateUtil.formatDateToDate( textDirection: ui.TextDirection.ltr,
(order.orderDate ?? order.appointmentDate), child: AppCustomChipWidget(
false, labelText: DateUtil.formatDateToDate(
(order.orderDate ?? order.appointmentDate),
false,
), isEnglishOnly: true,
), ),
), ),
AppCustomChipWidget( 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:open_filex/open_filex.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'dart:ui' as ui;
class RadiologyResultPage extends StatefulWidget { class RadiologyResultPage extends StatefulWidget {
RadiologyResultPage({super.key, required this.patientRadiologyResponseModel}); RadiologyResultPage({super.key, required this.patientRadiologyResponseModel});
@ -52,6 +53,14 @@ class _RadiologyResultPageState extends State<RadiologyResultPage> {
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.radiologyResult.tr(context: context), 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: SingleChildScrollView(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.h), padding: EdgeInsets.symmetric(horizontal: 24.h),
@ -71,31 +80,34 @@ class _RadiologyResultPageState extends State<RadiologyResultPage> {
SizedBox(height: 16.h), SizedBox(height: 16.h),
// widget.patientRadiologyResponseModel.description!.toText16(isBold: true), // widget.patientRadiologyResponseModel.description!.toText16(isBold: true),
SizedBox(height: 8.h), SizedBox(height: 8.h),
widget.patientRadiologyResponseModel.reportData!.trim().toText12(isBold: true, color: AppColors.textColorLight), Directionality(
SizedBox(height: 16.h), textDirection: ui.TextDirection.ltr,
CustomButton( child: widget.patientRadiologyResponseModel.reportData!.trim().toText12(isBold: true, color: AppColors.textColorLight, isEnglishOnly: true),
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), 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), ).paddingSymmetrical(16.h, 0.h),
), ),
@ -116,16 +128,21 @@ class _RadiologyResultPageState extends State<RadiologyResultPage> {
text: LocaleKeys.downloadReport.tr(context: context), text: LocaleKeys.downloadReport.tr(context: context),
onPressed: () async { onPressed: () async {
LoaderBottomSheet.showLoader(); LoaderBottomSheet.showLoader();
await radiologyViewModel.getRadiologyPDF(patientRadiologyResponseModel: widget.patientRadiologyResponseModel, authenticatedUser: _appState.getAuthenticatedUser()!, onError: (err) { await radiologyViewModel
LoaderBottomSheet.hideLoader(); .getRadiologyPDF(
showCommonBottomSheetWithoutHeight( patientRadiologyResponseModel: widget.patientRadiologyResponseModel,
context, authenticatedUser: _appState.getAuthenticatedUser()!,
child: Utils.getErrorWidget(loadingText: err), onError: (err) {
callBackFunc: () {}, LoaderBottomSheet.hideLoader();
isFullScreen: false, showCommonBottomSheetWithoutHeight(
isCloseButtonVisible: true, context,
); child: Utils.getErrorWidget(loadingText: err),
}).then((val) async { callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
})
.then((val) async {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
if (radiologyViewModel.patientRadiologyReportPDFBase64.isNotEmpty) { if (radiologyViewModel.patientRadiologyReportPDFBase64.isNotEmpty) {
String path = await Utils.createFileFromString(radiologyViewModel.patientRadiologyReportPDFBase64, "pdf"); String path = await Utils.createFileFromString(radiologyViewModel.patientRadiologyReportPDFBase64, "pdf");

@ -26,6 +26,7 @@ class CollapsingListView extends StatelessWidget {
VoidCallback? sendEmail; VoidCallback? sendEmail;
VoidCallback? doctorResponse; VoidCallback? doctorResponse;
VoidCallback? downloadReport; VoidCallback? downloadReport;
VoidCallback? viewImage;
Widget? bottomChild; Widget? bottomChild;
Widget? trailing; Widget? trailing;
bool isClose; bool isClose;
@ -49,6 +50,7 @@ class CollapsingListView extends StatelessWidget {
this.sendEmail, this.sendEmail,
this.doctorResponse, this.doctorResponse,
this.downloadReport, this.downloadReport,
this.viewImage,
this.isLeading = true, this.isLeading = true,
this.trailing, this.trailing,
this.leadingCallback, this.leadingCallback,
@ -92,6 +94,7 @@ class CollapsingListView extends StatelessWidget {
sendEmail: sendEmail, sendEmail: sendEmail,
doctorResponse: doctorResponse, doctorResponse: doctorResponse,
downloadReport: downloadReport, downloadReport: downloadReport,
viewImage: viewImage,
bottomChild: bottomChild, bottomChild: bottomChild,
trailing: trailing, trailing: trailing,
aiOverview: aiOverview, aiOverview: aiOverview,
@ -204,6 +207,7 @@ class ScrollAnimatedTitle extends StatefulWidget implements PreferredSizeWidget
VoidCallback? sendEmail; VoidCallback? sendEmail;
VoidCallback? doctorResponse; VoidCallback? doctorResponse;
VoidCallback? downloadReport; VoidCallback? downloadReport;
VoidCallback? viewImage;
Widget? bottomChild; Widget? bottomChild;
Widget? trailing; Widget? trailing;
@ -222,6 +226,7 @@ class ScrollAnimatedTitle extends StatefulWidget implements PreferredSizeWidget
this.sendEmail, this.sendEmail,
this.doctorResponse, this.doctorResponse,
this.downloadReport, this.downloadReport,
this.viewImage,
this.bottomChild, this.bottomChild,
this.trailing, 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.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.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.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!, if (widget.trailing != null) widget.trailing!,
] ]
], ],

@ -27,6 +27,7 @@ class AppCustomChipWidget extends StatelessWidget {
this.labelPadding, this.labelPadding,
this.onDeleteTap, this.onDeleteTap,
this.applyThemeColor = true, this.applyThemeColor = true,
this.isEnglishOnly = false
}); });
final String? labelText; final String? labelText;
@ -48,6 +49,7 @@ class AppCustomChipWidget extends StatelessWidget {
final void Function()? onChipTap; final void Function()? onChipTap;
final void Function()? onDeleteTap; final void Function()? onDeleteTap;
final bool applyThemeColor; final bool applyThemeColor;
final bool isEnglishOnly;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -85,7 +87,7 @@ class AppCustomChipWidget extends StatelessWidget {
applyThemeColor: applyThemeColor, applyThemeColor: applyThemeColor,
) )
: SizedBox.shrink(), : 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, padding: padding,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
labelPadding: labelPadding ?? EdgeInsetsDirectional.only(end: deleteIcon?.isNotEmpty == true ? 2.w : 8.w), labelPadding: labelPadding ?? EdgeInsetsDirectional.only(end: deleteIcon?.isNotEmpty == true ? 2.w : 8.w),
@ -112,7 +114,7 @@ class AppCustomChipWidget extends StatelessWidget {
) )
: Chip( : Chip(
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, 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, padding: EdgeInsets.zero,
backgroundColor: resolvedBackgroundColor, backgroundColor: resolvedBackgroundColor,
shape: shape ?? shape: shape ??

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

Loading…
Cancel
Save