Merge pull request 'haroon_dev' (#212) from haroon_dev into master

Reviewed-on: https://34.17.182.140/Haroon6138/HMG_Patient_App_New/pulls/212
pull/214/head
Haroon6138 3 days ago
commit 7abee6bb5e

@ -50,6 +50,8 @@
android:name="android.permission.ACCESS_BACKGROUND_LOCATION"
tools:node="remove" /> <!-- <uses-permission android:name="android.permission.INTERNET" /> -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" tools:node="remove" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
@ -92,7 +94,6 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" tools:node="remove"/>
<uses-permission android:name="android.permission.VIDEO_CAPTURE" />
<uses-permission android:name="android.permission.AUDIO_CAPTURE" />

@ -45,6 +45,7 @@
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" tools:node="remove" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" tools:node="remove" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" tools:node="remove" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" tools:node="remove" />
<uses-permission
android:name="android.permission.ACCESS_BACKGROUND_LOCATION"
@ -93,7 +94,6 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.VIDEO_CAPTURE" />
<uses-permission android:name="android.permission.AUDIO_CAPTURE" />

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

After

Width:  |  Height:  |  Size: 228 KiB

@ -0,0 +1,6 @@
<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="56" height="56" rx="28" fill="white"/>
<rect width="56" height="56" rx="28" fill="white"/>
<rect x="0.5" y="0.5" width="55" height="55" rx="27.5" stroke="#2E3039" stroke-opacity="0.13" stroke-dasharray="2 2"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M28 18.25C28.4142 18.25 28.75 18.5858 28.75 19V26.25H36C36.4142 26.25 36.75 26.5858 36.75 27C36.75 27.4142 36.4142 27.75 36 27.75H28.75V35C28.75 35.4142 28.4142 35.75 28 35.75C27.5858 35.75 27.25 35.4142 27.25 35V27.75H20C19.5858 27.75 19.25 27.4142 19.25 27C19.25 26.5858 19.5858 26.25 20 26.25H27.25V19C27.25 18.5858 27.5858 18.25 28 18.25Z" fill="#161616" stroke="#2E3039" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 835 B

@ -0,0 +1,6 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="40" height="40" rx="10" fill="#EFEFF0"/>
<path d="M18.9994 9.25C16.0999 9.25 13.7494 11.6005 13.7494 14.5C13.7494 17.3995 16.0999 19.75 18.9994 19.75C21.8989 19.75 24.2494 17.3995 24.2494 14.5C24.2494 11.6005 21.8989 9.25 18.9994 9.25Z" fill="#8F9AA3"/>
<path d="M22.4393 22.3825L22.4269 22.3899C22.3982 22.4063 22.3715 22.4164 22.3391 22.4232L22.3222 22.4264C21.5275 22.5747 20.3099 23.081 19.8772 24.4469C19.436 25.84 20.178 26.9751 20.7397 27.5414L20.9312 27.7346C21.045 27.8493 21.1019 27.9066 21.1231 27.9808C21.1442 28.055 21.1262 28.1337 21.09 28.2912L21.0601 28.4219C20.9887 28.7329 20.9096 29.2541 20.9862 29.8241C21.0509 30.3047 21.0832 30.545 20.9935 30.6475C20.9039 30.75 20.7005 30.75 20.2937 30.75L14.5901 30.75C12.7718 30.75 11.366 29.8556 10.1945 28.7396C9.51551 28.0927 9.17705 27.3646 9.26185 26.5888C9.3416 25.8592 9.78025 25.2637 10.2419 24.8118C10.9801 24.0893 12.0577 23.4813 12.7705 23.0792C12.9331 22.9875 13.0768 22.9064 13.1931 22.8372C14.4979 22.0602 15.93 21.5691 17.3945 21.3625C18.4583 21.2125 19.5401 21.2125 20.6039 21.3625C21.0835 21.4302 21.8204 21.628 22.365 21.7855C22.4184 21.801 22.4451 21.8087 22.4641 21.8172C22.6658 21.9073 22.7022 22.1856 22.5303 22.3244C22.5142 22.3375 22.4892 22.3525 22.4393 22.3825Z" fill="#8F9AA3"/>
<path d="M27.3627 22.245C27.12 21.7533 26.67 21.25 25.9982 21.25C25.3273 21.25 24.8762 21.7522 24.6315 22.2431L23.9345 23.6487L23.9282 23.6547C23.9233 23.6592 23.9176 23.6639 23.9113 23.6687C23.9049 23.6734 23.8987 23.6775 23.893 23.681L23.8859 23.6851L22.6351 23.8946C22.0941 23.9855 21.5068 24.2757 21.3091 24.8998C21.1123 25.5211 21.4213 26.0967 21.8065 26.4851L22.7841 27.4708C22.7875 27.4778 22.792 27.4888 22.7959 27.5027C22.8003 27.5181 22.8024 27.5314 22.8031 27.5401L22.524 28.7572C22.397 29.3106 22.3883 30.0742 22.9815 30.5106C23.5783 30.9496 24.3047 30.7069 24.7916 30.4156L25.9668 29.7142C26.0142 29.6859 26.0283 29.702 26.0294 29.7135L27.2061 30.4159C27.6913 30.7048 28.4194 30.9516 29.0171 30.5123C29.6116 30.0753 29.5995 29.3093 29.4735 28.7579L29.1942 27.5401C29.1949 27.5314 29.197 27.5181 29.2014 27.5027C29.2053 27.4888 29.2098 27.4778 29.2132 27.4708L30.1889 26.487L30.1899 26.486C30.5775 26.0974 30.8877 25.521 30.6893 24.8985C30.4905 24.275 29.9028 23.9855 29.3626 23.8947L28.1075 23.6844L28.0992 23.6798C28.0935 23.6763 28.0874 23.6722 28.0811 23.6676C28.0789 23.6659 28.0766 23.6642 28.0745 23.6625C28.0709 23.6596 28.0675 23.6567 28.0645 23.654L28.0587 23.6484L27.3632 22.2459L27.3627 22.245Z" fill="#8F9AA3"/>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -0,0 +1,9 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="40" height="40" rx="10" fill="#2E3039"/>
<path d="M16 20C15.4477 20 15 20.4477 15 21C15 21.5523 15.4477 22 16 22H16.009C16.5613 22 17.009 21.5523 17.009 21C17.009 20.4477 16.5613 20 16.009 20H16Z" fill="white"/>
<path d="M19.9955 20C19.4432 20 18.9955 20.4477 18.9955 21C18.9955 21.5523 19.4432 22 19.9955 22H20.0045C20.5568 22 21.0045 21.5523 21.0045 21C21.0045 20.4477 20.5568 20 20.0045 20H19.9955Z" fill="white"/>
<path d="M23.991 20C23.4387 20 22.991 20.4477 22.991 21C22.991 21.5523 23.4387 22 23.991 22H24C24.5523 22 25 21.5523 25 21C25 20.4477 24.5523 20 24 20H23.991Z" fill="white"/>
<path d="M16 24C15.4477 24 15 24.4477 15 25C15 25.5523 15.4477 26 16 26H16.009C16.5613 26 17.009 25.5523 17.009 25C17.009 24.4477 16.5613 24 16.009 24H16Z" fill="white"/>
<path d="M19.9955 24C19.4432 24 18.9955 24.4477 18.9955 25C18.9955 25.5523 19.4432 26 19.9955 26H20.0045C20.5568 26 21.0045 25.5523 21.0045 25C21.0045 24.4477 20.5568 24 20.0045 24H19.9955Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.75 10C14.75 9.58579 14.4142 9.25 14 9.25C13.5858 9.25 13.25 9.58579 13.25 10V10.6348C12.4452 10.8629 11.7665 11.2336 11.2015 11.8444C10.4236 12.6853 10.0778 13.7479 9.91225 15.0795C9.74998 16.3843 9.74999 18.0565 9.75 20.19V20.81C9.74999 22.9435 9.74998 24.6157 9.91225 25.9205C10.0778 27.2521 10.4236 28.3147 11.2015 29.1556C11.9871 30.0049 12.9928 30.3901 14.2513 30.573C15.4693 30.75 17.0255 30.75 18.9892 30.75H21.0108C22.9745 30.75 24.5307 30.75 25.7487 30.573C27.0072 30.3901 28.0129 30.0049 28.7985 29.1556C29.5764 28.3147 29.9222 27.2521 30.0878 25.9205C30.25 24.6157 30.25 22.9435 30.25 20.8099V20.1901C30.25 18.0565 30.25 16.3843 30.0878 15.0795C29.9222 13.7479 29.5764 12.6853 28.7985 11.8444C28.2335 11.2336 27.5548 10.8629 26.75 10.6348V10C26.75 9.58579 26.4142 9.25 26 9.25C25.5858 9.25 25.25 9.58579 25.25 10V10.3659C24.1139 10.25 22.716 10.25 21.0108 10.25L18.9892 10.25C17.284 10.25 15.8861 10.25 14.75 10.3659V10ZM13.2786 12.2058C13.3681 12.52 13.6572 12.75 14 12.75C14.4142 12.75 14.75 12.4142 14.75 12V11.8746C15.811 11.7516 17.1824 11.75 19.05 11.75L20.95 11.75C22.8176 11.75 24.189 11.7516 25.25 11.8746V12C25.25 12.4142 25.5858 12.75 26 12.75C26.3428 12.75 26.6319 12.52 26.7214 12.2058C27.1287 12.3679 27.438 12.5826 27.6973 12.8629C28.1704 13.3744 28.4505 14.0759 28.5982 15.2564C28.5661 15.2522 28.5333 15.25 28.5 15.25L11.5 15.25C11.4667 15.25 11.4339 15.2522 11.4018 15.2564C11.5495 14.0759 11.8296 13.3744 12.3027 12.8629C12.562 12.5826 12.8713 12.3679 13.2786 12.2058ZM11.2901 16.7202C11.2506 17.6832 11.25 18.8363 11.25 20.2432V20.7568C11.25 22.9551 11.2514 24.5339 11.4008 25.7354C11.5482 26.9208 11.8285 27.6244 12.3027 28.1371C12.7692 28.6414 13.3973 28.9331 14.467 29.0886C15.5648 29.2481 17.0119 29.25 19.05 29.25H20.95C22.9881 29.25 24.4352 29.2481 25.533 29.0886C26.6027 28.9331 27.2308 28.6414 27.6973 28.1371C28.1715 27.6244 28.4518 26.9208 28.5992 25.7354C28.7486 24.5339 28.75 22.9551 28.75 20.7568V20.2432C28.75 18.8363 28.7494 17.6832 28.7099 16.7202C28.6433 16.7396 28.5728 16.75 28.5 16.75L11.5 16.75C11.4272 16.75 11.3567 16.7396 11.2901 16.7202Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

@ -936,7 +936,7 @@
"hospitalInformation": "معلومات المستشفى",
"fetchingAppointmentShare": "جاري جلب تفاصيل الموعد...",
"bookingYourAppointment": "جاري حجز موعدك...",
"selectLiveCareClinic": "اختر عيادة لايف كير",
"selectLiveCareClinic": "عيادة لايف كير",
"checkingForExistingDentalPlan": "جاري التحقق من وجود خطة أسنان حالية، يرجى الانتظار...",
"dentalTreatmentPlan": "خطة علاج الأسنان",
"youHaveExistingTreatmentPlan": "لديك خطة علاج حالية: ",
@ -1654,8 +1654,40 @@
"twoWaySubtitle": "نقل من الموقع إلى المستشفى والعودة مرة أخرى",
"toHospitalSubtitle": "نقل من موقعك الحالي إلى المستشفى",
"fromHospitalSubtitle": "نقل من المستشفى إلى منزلك",
"clinicSchedule": "جدول العيادة",
"doctorAddedToFavourite": "تمت إضافة إلى قائمة المفضلة",
"doctorRemovedFromFavourite": "تمت إزالة من قائمة الأطباء المفضلين",
"addNewFavorite": "إضافة مفضلة جديدة",
"favourites": "المفضلة",
"pendingAncillaryOrders": "مدفوعات طلبات الاضافية",
"liveCarePermissions": "يتطلب لايف كير أذونات الكاميرا والميكروفون وإشعارات، يرجى السماح لها بالمتابعة.",
"containsImage": "يحتوي على صورة",
"servicesSelected": "الخدمة (الخدمات) المختارة",
"selectMedicalFileFromFamily": "اختر ملف طبي من عائلتك",
"anyFileFromHMG": "أي ملف طبي نشط من مجموعة حبيب الطبية",
"noDistance": "المسافة غير متوفرة",
"enterAmount": "يرجى إدخال المبلغ للمتابعة.",
"selectHospitalContinue": "يرجى اختيار المستشفى للمتابعة.",
"year": "سنة",
"notifyPrescription": "أبلغني قبل وقت الاستهلاك",
"doctorRatingAppointment": "طبيب\nتصنيف",
"ratingSubmitted": "تم إرسال التقييم",
"rateTheDoctor": "يرجى تقييم الطبيب",
"downloadInvoice": "تحميل الفاتورة",
"approvalDetails": "تفاصيل الموافقة",
"obese": "سمين",
"overWeight": "وزن زائد",
"underWeight": "وزن ناقص",
"nearestGate": "أقرب بوابة",
"RRTDDetails": "فريق الاستجابة السريعة يقوم بتقديم رعاية صحية متكاملة لجميع الحالات الطارئة و المستقرة، الخدمة تشمل جميع الأعمار بما في ذلك حالات الأطفال.",
"fromHospitalSubtitle": "نقل من المستشفى إلى منزلك",
"normalMapType": "افتراضي",
"satelliteMapType": "قمر صناعي",
"terrainMapType": "تضاريس",
"hybridMapType": "هجين"
"hybridMapType": "هجين",
"openCamera": "افتح الكاميرا",
"openGallery": "افتح المعرض",
"openFiles": "فتح الملفات",
"generateAiAnalysisRadResult": "بإنشاء تحليل الذكاء الاصطناعي لهذا التقرير",
"grantLocationPermission": "يرجى منح إذن الوصول إلى الموقع من إعدادات التطبيق للحصول على نتائج أفضل."
}

@ -930,7 +930,7 @@
"hospitalInformation": "Hospital Information",
"fetchingAppointmentShare": "Fetching Appointment Share...",
"bookingYourAppointment": "Booking your appointment...",
"selectLiveCareClinic": "Select LiveCare Clinic",
"selectLiveCareClinic": "LiveCare Clinic",
"checkingForExistingDentalPlan": "Checking for an existing dental plan, Please wait...",
"dentalTreatmentPlan": "Dental treatment plan",
"youHaveExistingTreatmentPlan": "You have an existing treatment plan: ",
@ -1241,7 +1241,7 @@
"quickLinks": "Quick Links",
"viewMedicalFileLandingPage": "View medical file",
"immediateLiveCareRequest": "Immediate LiveCare Request",
"yourTurnIsAfterPatients": "Your turn is after {count} patients.",
"yourTurnIsAfterPatients": "Your turn is after {count} patients. Please wait for your turn, The doctor will call you shortly.",
"dontHaveHHCOrders": "You don't have any Home Health Care orders yet.",
"hhcOrders": "HHC Orders",
"requestedServices": "Requested Services",
@ -1309,7 +1309,7 @@
"rejectedYourFamilyMemberRequest": "{status} your family member request",
"notAvailable": "N/A",
"selectAProfile": "Please select a profile",
"switchFamilyFile": "Switch from the below list of medical file",
"switchFamilyFile": "Switch from the below list of medical files",
"medicalFiles": "Medical Files",
"addANewFamilyMember": "Add a new family member",
"viewInvoiceDetails": "View invoice details",
@ -1646,8 +1646,40 @@
"twoWaySubtitle": "Round trip from location to hospital and back",
"toHospitalSubtitle": "Transfer from your current location to the hospital",
"fromHospitalSubtitle": "Transfer from the hospital back to your home",
"clinicSchedule": "Clinic Schedule",
"doctorAddedToFavourite": "Added to favorites list",
"doctorRemovedFromFavourite": "Removed from favorites list",
"favourites": "Favourites",
"addNewFavorite": "Add new favourite",
"pendingAncillaryOrders": "Pending ancillary orders",
"liveCarePermissions": "LiveCare requires Camera, Microphone & Notifications permissions to enable virtual consultation between patient & doctor, Open app settings to allow them.",
"containsImage": "Contains Image",
"servicesSelected": "Service(s) Selected",
"selectMedicalFileFromFamily": "Select a medical file from your family",
"anyFileFromHMG": "Any active medical file from HMG",
"noDistance": "Distance not available",
"enterAmount": "Please enter amount to continue.",
"selectHospitalContinue": "Please select hospital to continue.",
"year": "Year",
"notifyPrescription": "Notify me before the consumption time",
"doctorRatingAppointment": "Doctor\nRating",
"ratingSubmitted": "Rating Submitted",
"rateTheDoctor": "Please rate the doctor",
"downloadInvoice": "Download Invoice",
"approvalDetails": "Approval Details",
"obese": "Obese",
"overWeight": "OverWeight",
"underWeight": "UnderWeight",
"nearestGate": "Nearest Gate",
"RRTDDetails": "The Rapid response team provides a comprehensive medical service for all sorts of urgent and stable cases of all ages, including adult and paediatric patients.",
"fromHospitalSubtitle": "Transfer from the hospital back to your home",
"normalMapType": "Default",
"satelliteMapType": "Satellite",
"terrainMapType": "Terrain",
"hybridMapType": "Hybrid"
"hybridMapType": "Hybrid",
"openCamera": "Open Camera",
"openGallery": "Open Gallery",
"openFiles": "Open Files",
"generateAiAnalysisRadResult": "Generate AI analysis for this result",
"grantLocationPermission": "Please grant location permission from app settings to see better results."
}

@ -233,6 +233,11 @@ class ApiConsts {
static String getAiOverViewLabOrders = "Services/Patients.svc/REST/HMGAI_Lab_Analyze_Orders_API";
static String getAiOverViewLabOrder = "Services/Patients.svc/REST/HMGAI_Lab_Analyzer_API";
static String googleCloudStorageARTranslationFileURL = "https://storage.googleapis.com/hmg-patientapp-translations/ar-SA.json";
static String googleCloudStorageENTranslationFileURL = "https://storage.googleapis.com/hmg-patientapp-translations/en-US.json";
static String googleCloudStorageENTranslationFileBaseURL = "https://storage.googleapis.com/hmg-patientapp-translations";
// ************ static values for Api ****************
static final double appVersionID = 20.9;
@ -450,6 +455,7 @@ var IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated_
var GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
var NEW_RATE_APPOINTMENT_URL = "Services/Doctors.svc/REST/AppointmentsRating_InsertAppointmentRate";
var NEW_RATE_DOCTOR_URL = "Services/Doctors.svc/REST/DoctorsRating_InsertDoctorRate";
var GET_DOCTORS_RATING_CHECK = "Services/Doctors.svc/REST/GetDoctorsRatingCheck";
//var GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
@ -934,6 +940,8 @@ const PROFILE_SETTING = 'Services/Patients.svc/REST/GetPateintInfoForUpdate';
const SAVE_SETTING = 'Services/Patients.svc/REST/UpdatePateintInfo';
const DOWNLOAD_INVOICE_PDF = 'Services/Notifications.svc/REST/DownloadInvoiceReport';
class ApiKeyConstants {
static final String googleMapsApiKey = 'AIzaSyB6TERnxIr0yJ3qG4ULBZbu0sAD4tGqtng';
}

@ -220,6 +220,7 @@ class AppAssets {
static const String ibw = '$svgBasePath/ibw.svg';
static const String general_health = '$svgBasePath/general_health.svg';
static const String women_health = '$svgBasePath/women_health.svg';
static const String add_new_family_icon = '$svgBasePath/add_new_family_icon.svg';
static const String height = '$svgBasePath/height.svg';
static const String weight = '$svgBasePath/weight.svg';
@ -236,6 +237,7 @@ class AppAssets {
static const String forward_top_nav_icon = '$svgBasePath/forward_top_nav_icon.svg';
static const String back_top_nav_icon = '$svgBasePath/back_top_nav_icon.svg';
static const String bluetooth = '$svgBasePath/bluetooth.svg';
static const String calendar_filled_icon = '$svgBasePath/calendar_filled_icon.svg';
//smartwatch
static const String watchActivity = '$svgBasePath/watch_activity.svg';
@ -354,6 +356,7 @@ class AppAssets {
static const String darkModeIcon = '$svgBasePath/dark_mode_icon.svg';
static const String biometricLockIcon = '$svgBasePath/biometric_lock_icon.svg';
static const String imageIcon = '$svgBasePath/image_icon.svg';
static const String appointmentRatingIcon = '$svgBasePath/appointment_rating_icon.svg';
// PNGS //
static const String hmgLogo = '$pngBasePath/hmg_logo.png';

@ -99,7 +99,7 @@ class LocationUtils {
title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!),
navigationService.navigatorKey.currentContext!,
child: Utils.getWarningWidget(
loadingText: "Please grant location permission from app settings to see better results",
loadingText: LocaleKeys.grantLocationPermission.tr(),
isShowActionButtons: true,
onCancelTap: () {
navigationService.pop();
@ -124,7 +124,7 @@ class LocationUtils {
title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!),
navigationService.navigatorKey.currentContext!,
child: Utils.getWarningWidget(
loadingText: "Please grant location permission from app settings to see better results",
loadingText: LocaleKeys.grantLocationPermission.tr(),
isShowActionButtons: true,
onCancelTap: () {
navigationService.pop();
@ -285,7 +285,7 @@ class LocationUtils {
title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!),
navigationService.navigatorKey.currentContext!,
child: Utils.getWarningWidget(
loadingText: "Please grant location permission from app settings to see better results",
loadingText: LocaleKeys.grantLocationPermission.tr(),
isShowActionButtons: true,
onCancelTap: () {
navigationService.pop();

@ -396,10 +396,10 @@ class PushNotificationHandler {
final deviceInfo = DeviceInfoPlugin();
final androidInfo = await deviceInfo.androidInfo;
int sdkInt = androidInfo.version.sdkInt ?? 0;
if (sdkInt >= 33) {
await FlutterCallkitIncoming.requestFullIntentPermission();
}
// int sdkInt = androidInfo.version.sdkInt ?? 0;
// if (sdkInt >= 33) {
// await FlutterCallkitIncoming.requestFullIntentPermission();
// }
}
}

@ -355,7 +355,7 @@ class Utils {
repeat: false, reverse: false, frameRate: FrameRate(60), width: width.w, height: height.h, fit: BoxFit.fill),
SizedBox(height: 16.h),
(noDataText ?? LocaleKeys.noDataAvailable.tr())
.toText14(weight: FontWeight.w500, color: AppColors.greyTextColor, isCenter: true)
.toText14(isBold: true, color: AppColors.greyTextColor, isCenter: true)
.paddingSymmetrical(64.w, 0.h),
SizedBox(height: 16.h),
callToActionButton
@ -371,7 +371,7 @@ class Utils {
Lottie.asset(AppAnimations.loadingAnimation,
repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.fill),
SizedBox(height: 8.h),
(loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor, isCenter: true),
(loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor, isCenter: true, isBold: true),
SizedBox(height: 8.h),
],
).center;
@ -384,7 +384,7 @@ class Utils {
children: [
Lottie.asset(AppAnimations.checkmark, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
SizedBox(height: 8.h),
(loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor).paddingSymmetrical(24.h, 0.h),
(loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor, isBold: true).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 8.h),
],
).center;

@ -24,7 +24,7 @@ extension CapExtension on String {
extension EmailValidator on String {
Widget get toWidget => Text(this);
Widget toText8({Color? color, FontWeight? fontWeight, bool isBold = false, int? maxlines, FontStyle? fontStyle, TextOverflow? textOverflow}) => Text(
Widget toText8({bool isEnglishOnly = false, Color? color, FontWeight? fontWeight, bool isBold = false, int? maxlines, FontStyle? fontStyle, TextOverflow? textOverflow}) => Text(
this,
maxLines: maxlines,
overflow: textOverflow,
@ -34,6 +34,7 @@ extension EmailValidator on String {
fontWeight: fontWeight ?? (isBold ? FontWeight.bold : FontWeight.normal),
color: color ?? AppColors.blackColor,
letterSpacing: 0,
fontFamily: getIt.get<AppState>().getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins',
),
);
@ -60,7 +61,7 @@ extension EmailValidator on String {
color: color ?? AppColors.blackColor,
letterSpacing: letterSpacing,
decoration: isUnderLine ? TextDecoration.underline : null,
fontFamily: isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins',
fontFamily: getIt.get<AppState>().getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins',
decorationColor: color ?? AppColors.blackColor),
);
@ -80,7 +81,7 @@ extension EmailValidator on String {
maxLines: maxlines,
overflow: textOverflow,
style: TextStyle(
fontFamily: isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins',
fontFamily: getIt.get<AppState>().getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins',
fontSize: 9.f,
fontStyle: fontStyle ?? FontStyle.normal,
fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal),
@ -101,7 +102,7 @@ extension EmailValidator on String {
color: color ?? AppColors.blackColor,
letterSpacing: letterSpacing,
decoration: isUnderLine ? TextDecoration.underline : null,
fontFamily: isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins',
fontFamily: getIt.get<AppState>().getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins',
),
);
@ -114,8 +115,7 @@ extension EmailValidator on String {
bool isCenter = false,
double? height,
double? letterSpacing,
int maxLine = 0, String? fontFamily,
}) =>
int maxLine = 0}) =>
Text(
this,
textAlign: isCenter ? TextAlign.center : textAlignment,
@ -128,7 +128,7 @@ extension EmailValidator on String {
height: height,
decorationColor: isUnderLine ? AppColors.blackColor : null,
decoration: isUnderLine ? TextDecoration.underline : null,
fontFamily:fontFamily ??( isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
fontFamily: getIt.get<AppState>().getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins',
),
);
@ -211,7 +211,7 @@ extension EmailValidator on String {
height: height,
fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal),
decoration: isUnderLine ? TextDecoration.underline : null,
fontFamily: fontFamily ?? (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
fontFamily: fontFamily ?? (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins'),
decorationColor: color ?? AppColors.blackColor),
);
@ -252,14 +252,14 @@ extension EmailValidator on String {
overflow: textOverflow,
fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal),
decoration: isUnderLine ? TextDecoration.underline : null,
fontFamily: fontFamily ?? (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
fontFamily: fontFamily ?? (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins'),
decorationColor: decorationColor ?? AppColors.errorColor),
);
Widget toText17({bool isEnglishOnly = false, Color? color, bool isBold = false, bool isCenter = false}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
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: getIt.get<AppState>().getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins'),
);
Widget toText18({Color? color, FontWeight? weight, bool isBold = false, bool isCenter = false, int? maxlines, TextOverflow? textOverflow, bool isEnglishOnly = false,}) => Text(
@ -267,7 +267,7 @@ extension EmailValidator on String {
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, fontFamily: (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),),
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" ? 'CairoArabic' : 'Poppins'),),
);
Widget toText19({Color? color, bool isBold = false}) => Text(
@ -285,11 +285,10 @@ extension EmailValidator on String {
style: TextStyle(fontSize: 20.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), color: color ?? AppColors.blackColor, letterSpacing: -0.4),
);
Widget toText21({Color? color, bool isBold = false, FontWeight? weight, int? maxlines, bool isEnglishOnly = false}) => Text(
Widget toText21({Color? color, bool isBold = false, FontWeight? weight, int? maxlines}) => Text(
this,
maxLines: maxlines,
style: TextStyle(color: color ?? AppColors.blackColor, fontSize: 21.f, letterSpacing: -1, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal),
fontFamily: (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins')),
style: TextStyle(color: color ?? AppColors.blackColor, fontSize: 21.f, letterSpacing: -1, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal)),
);
Widget toText22({Color? color, bool isBold = false, bool isCenter = false}) => Text(
@ -302,7 +301,7 @@ extension EmailValidator on String {
this,
textAlign: isCenter ? TextAlign.center : null,
style: TextStyle(
fontFamily: (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
fontFamily: (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins'),
height: 23 / 24, color: color ?? AppColors.blackColor, fontSize: 24.f, letterSpacing: letterSpacing ?? -1, fontWeight: isBold ? FontWeight.bold : fontWeight ?? FontWeight.normal),
);
@ -310,26 +309,26 @@ extension EmailValidator on String {
this,
textAlign: isCenter ? TextAlign.center : null,
style: TextStyle(
fontFamily: (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
fontFamily: (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins'),
height: height ?? 23 / 26, color: color ?? AppColors.blackColor, fontSize: 26.f, letterSpacing: letterSpacing ?? -1, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal)),
);
Widget toText28({bool isEnglishOnly = false, Color? color, bool isBold = false, double? height, bool isCenter = false, double? letterSpacing}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
style: TextStyle(height: height ?? 23 / 28, color: color ?? AppColors.blackColor, fontSize: 28.f, letterSpacing: letterSpacing ?? -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, fontFamily: isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
style: TextStyle(height: height ?? 23 / 28, color: color ?? AppColors.blackColor, fontSize: 28.f, letterSpacing: letterSpacing ?? -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, fontFamily: getIt.get<AppState>().getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins'),
);
Widget toText32({bool isEnglishOnly = false, FontWeight? weight, Color? color, bool isBold = false, bool isCenter = false}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
style: TextStyle(
height: 32 / 32, color: color ?? AppColors.blackColor, fontSize: 32.f, letterSpacing: -1, fontFamily: isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins', fontWeight: isBold ? FontWeight.bold : weight ?? FontWeight.normal),
height: 32 / 32, color: color ?? AppColors.blackColor, fontSize: 32.f, letterSpacing: -1, fontFamily: getIt.get<AppState>().getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins', fontWeight: isBold ? FontWeight.bold : weight ?? FontWeight.normal),
);
Widget toText44({Color? color, bool isBold = false, bool isEnglishOnly = false,}) => Text(
this,
style: TextStyle(height: 32 / 32, color: color ?? AppColors.blackColor, fontSize: 44.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, fontFamily: (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),),
style: TextStyle(height: 32 / 32, color: color ?? AppColors.blackColor, fontSize: 44.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, fontFamily: (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins'),),
);
Widget toSectionHeading({String upperHeading = "", String lowerHeading = ""}) {
@ -435,7 +434,7 @@ extension DynamicTextStyleExtension on BuildContext {
String? fontFamily,
bool isLanguageSwitcher = false}) {
AppState appState = getIt.get<AppState>();
final family = appState.getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins';
final family = appState.getLanguageCode() == "ar" ? 'CairoArabic' : 'Poppins';
return TextStyle(
fontFamily: fontFamily ?? family,
fontSize: fontSize,
@ -466,7 +465,7 @@ class FontUtils {
/// Get the appropriate font family for a specific language
static String getFontFamilyForLanguage(bool isArabic) {
return isArabic ? 'GESSTwo' : 'Poppins';
return isArabic ? 'CairoArabic' : 'Poppins';
}
}

@ -667,6 +667,7 @@ class AuthenticationRepoImp implements AuthenticationRepo {
@override
Future<Either<Failure, GenericApiModel<dynamic>>> getPatientBloodType() async {
// Map<String, dynamic> requestBody = {"PatientType": 1, "PatientTypeID": 1, "TokenID": "@dm!n", "PatientID": 5957754};
Map<String, dynamic> requestBody = {};
try {
GenericApiModel<dynamic>? apiResponse;

@ -101,7 +101,10 @@ class AuthenticationViewModel extends ChangeNotifier {
var healthId;
int getDeviceLastLogin = 1;
bool isInitialLoginNavigated = false;
Future<void> onLoginPressed() async {
setIsInitialLoginNavigated(false);
try {
LoaderBottomSheet.showLoader();
//TODO: We will remove this delay
@ -111,7 +114,7 @@ class AuthenticationViewModel extends ChangeNotifier {
if (data != null) {
await _handleExistingImeiData(data);
} else {
await _handleNewImeiRegistration();
await handleNewImeiRegistration();
}
} catch (e) {
log("Error in onLoginPressed: $e");
@ -199,6 +202,11 @@ class AuthenticationViewModel extends ChangeNotifier {
}
}
setIsInitialLoginNavigated(bool isInitialLoginNavigated) {
this.isInitialLoginNavigated = isInitialLoginNavigated;
notifyListeners();
}
void onTermAccepted() {
isTermsAccepted = !isTermsAccepted;
notifyListeners();
@ -216,7 +224,7 @@ class AuthenticationViewModel extends ChangeNotifier {
_appState.deviceToken = await Utils.getStringFromPrefs(CacheConst.pushToken);
}
Future<void> selectDeviceImei({required Function(dynamic data) onSuccess, Function(String)? onError}) async {
Future<void> selectDeviceImei({bool isNavigate = true, required Function(dynamic data) onSuccess, Function(String)? onError}) async {
// LoadingUtils.showFullScreenLoading();
// String firebaseToken = _appState.deviceToken;
String firebaseToken = await Utils.getStringFromPrefs(CacheConst.pushToken);
@ -231,7 +239,9 @@ class AuthenticationViewModel extends ChangeNotifier {
// LoadingUtils.hideFullScreenLoader();
// await _errorHandlerService.handleError(failure: failure);
LoaderBottomSheet.hideLoader();
_navigationService.pushPage(page: LoginScreen());
if (isNavigate) {
_navigationService.pushPage(page: LoginScreen());
}
},
(apiResponse) {
// LoadingUtils.hideFullScreenLoader();
@ -263,10 +273,13 @@ class AuthenticationViewModel extends ChangeNotifier {
}
}
Future<void> _handleNewImeiRegistration() async {
await selectDeviceImei(onSuccess: (dynamic respData) async {
try {
if (respData != null) {
Future<void> handleNewImeiRegistration({bool isNavigate = true}) async {
print("handleNewImeiRegistration called");
await selectDeviceImei(
isNavigate: isNavigate,
onSuccess: (dynamic respData) async {
try {
if (respData != null) {
dynamic data = await SelectDeviceByImeiRespModelElement.fromJson(respData.toJson());
_appState.setSelectDeviceByImeiRespModelElement(data);
LoaderBottomSheet.hideLoader();
@ -274,19 +287,24 @@ class AuthenticationViewModel extends ChangeNotifier {
// TODO: Navigate to SavedLogin when available
// SelectDeviceByImeiRespModelElement savedData =
// SelectDeviceByImeiRespModelElement.fromJson(respData);
_navigationService.pushPage(page: SavedLogin());
// _navigationService.pushPage(page: LoginScreen());
} else {
print("print login........");
LoaderBottomSheet.hideLoader();
_navigationService.pushPage(page: LoginScreen());
}
} catch (e) {
log("Error processing IMEI registration response: $e");
LoaderBottomSheet.hideLoader();
_navigationService.pushPage(page: LoginScreen());
}
}, onError: (String error) {
if (!isInitialLoginNavigated) {
_navigationService.pushPage(page: SavedLogin());
}
// _navigationService.pushPage(page: LoginScreen());
} else {
if (isNavigate) {
LoaderBottomSheet.hideLoader();
_navigationService.pushPage(page: LoginScreen());
}
}
} catch (e) {
if (isNavigate) {
log("Error processing IMEI registration response: $e");
LoaderBottomSheet.hideLoader();
_navigationService.pushPage(page: LoginScreen());
}
}
}, onError: (String error) {
LoaderBottomSheet.hideLoader();
_dialogService.showErrorBottomSheet(message: error, onOkPressed: () {});
});
@ -638,7 +656,7 @@ class AuthenticationViewModel extends ChangeNotifier {
_appState.setUserBloodGroup = activation.patientBlodType ?? "N/A";
// Fetch patient blood type from new API
await getPatientBloodTypeNew();
// await getPatientBloodTypeNew();
}
// _appState.setUserBloodGroup = (activation.patientBlodType ?? "");
_appState.setAppAuthToken = activation.authenticationTokenId;
@ -730,6 +748,8 @@ class AuthenticationViewModel extends ChangeNotifier {
}
Future<void> navigateToHomeScreen() async {
setIsInitialLoginNavigated(true);
getPatientBloodTypeNew();
Navigator.pushAndRemoveUntil(
_navigationService.navigatorKey.currentContext!,
CustomPageRoute(
@ -1026,7 +1046,9 @@ class AuthenticationViewModel extends ChangeNotifier {
nationalId: _appState.getAuthenticatedUser()!.patientIdentificationNo,
gender: _appState.getAuthenticatedUser()!.gender)
.toJson());
resultEither.fold((failure) async => await _errorHandlerService.handleError(failure: failure), (apiResponse) async {
resultEither.fold((failure) async {
// await _errorHandlerService.handleError(failure: failure);
}, (apiResponse) async {
if (apiResponse.messageStatus == 2) {}
if (apiResponse.messageStatus == 1) {
log("Insert Device Data Success");
@ -1180,7 +1202,7 @@ class AuthenticationViewModel extends ChangeNotifier {
(apiResponse) {
if (apiResponse.messageStatus == 1 && apiResponse.data != null) {
// Extract blood type from response
String? bloodType = apiResponse.data['GetPatientBloodType'];
String? bloodType = apiResponse.data['GetPatientBloodType'][0]["BloodType"];
if (bloodType != null && bloodType.isNotEmpty) {
_appState.setUserBloodGroup = bloodType;
log("Blood type updated from new API: $bloodType");

@ -26,7 +26,7 @@ class HospitalBottomSheetBodySelection extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if(!isHideTitle) LocaleKeys.selectHospital.tr(context: context).toText16(weight: FontWeight.w500, color: AppColors.greyTextColor),
if(!isHideTitle) LocaleKeys.selectHospital.tr(context: context).toText16(isBold: true, color: AppColors.greyTextColor),
SizedBox(height: 16.h),
SizedBox(
height: MediaQuery.sizeOf(context).height * .4,
@ -75,7 +75,8 @@ class HospitalBottomSheetBodySelection extends StatelessWidget {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.hmg).paddingOnly(right: 10),
Expanded(
child: Text(hospital.projectName ?? "", style: TextStyle(fontWeight: FontWeight.w600, fontSize: 16.f, color: AppColors.blackColor)),
child: (hospital.projectName ?? "").toString().toText16(isBold: true, color: AppColors.blackColor),
// Text(hospital.projectName ?? "", style: TextStyle(isBold: true, fontSize: 16.f, color: AppColors.blackColor)),
)
],
);

@ -331,6 +331,42 @@ class BookAppointmentsViewModel extends ChangeNotifier {
notifyListeners();
}
void filterDoctors(String query) {
if (query.isEmpty) {
filteredDoctorList = List.from(doctorsList);
_groupDoctorsList();
setIsNearestAppointmentSelected(isNearestAppointmentSelected);
notifyListeners();
return;
}
filteredDoctorList = doctorsList.where((doctor) {
final name = (doctor.name ?? '').toLowerCase();
final clinicName = (doctor.clinicName ?? '').toLowerCase();
final projectName = (doctor.projectName ?? '').toLowerCase();
final q = query.toLowerCase();
return name.contains(q) || clinicName.contains(q) || projectName.contains(q);
}).toList();
// Re-group filtered list
final clinicMap = <String, List<DoctorsListResponseModel>>{};
final hospitalMap = <String, List<DoctorsListResponseModel>>{};
for (var doctor in filteredDoctorList) {
final clinicKey = (doctor.clinicName ?? 'Unknown').trim();
clinicMap.putIfAbsent(clinicKey, () => []).add(doctor);
final hospitalKey = (doctor.projectName ?? 'Unknown').trim();
hospitalMap.putIfAbsent(hospitalKey, () => []).add(doctor);
}
doctorsListByClinic = clinicMap.values.toList();
doctorsListByHospital = hospitalMap.values.toList();
doctorsListGrouped = isSortByClinic ? doctorsListByClinic : doctorsListByHospital;
notifyListeners();
}
void filterClinics(String? query) {
if (query!.isEmpty) {
_filteredClinicsList = List.from(clinicsList);
@ -821,8 +857,8 @@ class BookAppointmentsViewModel extends ChangeNotifier {
}
initialSlotDuration = apiResponse.data["InitialSlotDuration"];
freeSlotsResponse = apiResponse.data['FreeTimeSlots'];
isWaitingAppointmentAvailable = apiResponse.data["IsAllowToBookWaitingAppointment"];
// isWaitingAppointmentAvailable = true;
// isWaitingAppointmentAvailable = apiResponse.data["IsAllowToBookWaitingAppointment"];
isWaitingAppointmentAvailable = true;
freeSlotsResponse.forEach((element) {
// date = (isLiveCareSchedule != null && isLiveCareSchedule)

@ -193,7 +193,7 @@ class DoctorsListResponseModel {
serviceID = json['ServiceID'];
setupID = json['SetupID'];
speciality = json['Speciality'] != null ? json['Speciality'].cast<String>() : [];
// specialityN = json['SpecialityN'].cast<String>();
specialityN = json['SpecialityN'] != null ? json['SpecialityN'].cast<String>() : [];
transactionType = json['TransactionType'];
virtualEmploymentType = json['VirtualEmploymentType'];
workingHours = json['WorkingHours'];

@ -1,4 +1,6 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
/// UI-only helper model for Vital Sign cards.
@ -49,7 +51,7 @@ class VitalSignUiModel {
}
// Warning for both low and overweight/underweight BMI, since they can indicate potential health issues.
if (s.contains('low') || s.contains('underweight') || s.contains('overweight')) {
if (s.contains('low') || s.contains("OverWeight") || s.contains("وزن زائد") || s.contains("UnderWeight") || s.contains("وزن ناقص")) {
final Color yellowBg = AppColors.highAndLow.withValues(alpha: 0.12);
return VitalSignUiModel(
iconBg: yellowBg,
@ -96,13 +98,13 @@ class VitalSignUiModel {
final double bmiResult = double.tryParse(bmi.toString()) ?? 0;
if (bmiResult >= 30) {
bmiStatus = "High";
bmiStatus = LocaleKeys.obese.tr();
} else if (bmiResult < 30 && bmiResult >= 25) {
bmiStatus = "Overweight";
bmiStatus = LocaleKeys.overWeight.tr();
} else if (bmiResult < 25 && bmiResult >= 18.5) {
bmiStatus = "Normal";
bmiStatus = LocaleKeys.normal.tr();
} else if (bmiResult < 18.5) {
bmiStatus = "Underweight";
bmiStatus = LocaleKeys.underWeight.tr();
}
// if (bmi == null) return 'N/A';

@ -5,6 +5,7 @@ import 'package:hmg_patient_app_new/core/api/api_client.dart';
import 'package:hmg_patient_app_new/core/api_consts.dart';
import 'package:hmg_patient_app_new/core/common_models/generic_api_model.dart';
import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/models/resp_models/get_livecare_clinic_schedule_response_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/models/resp_models/get_livecare_immediate_clinics_response_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/models/resp_models/get_livecare_immediate_fees_response_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/models/resp_models/get_patient_livecare_history_response_model.dart';
@ -13,6 +14,9 @@ import 'package:hmg_patient_app_new/services/logger_service.dart';
abstract class ImmediateLiveCareRepo {
Future<Either<Failure, GenericApiModel<List<GetLiveCareClinicListResponseModel>>>> getLiveCareImmediateClinicsList(int age, int genderID, {Function(dynamic)? onSuccess, Function(String)? onError});
Future<Either<Failure, GenericApiModel<List<LiveCareClinicScheduleResponse>>>> getLiveCareImmediateClinicSchedule(int age, int genderID, int serviceID,
{Function(dynamic)? onSuccess, Function(String)? onError});
Future<Either<Failure, GenericApiModel<LiveCareImmediateAppointmentFeesList>>> getLiveCareImmediateAppointmentFees(int age, int genderID, int serviceID,
{Function(dynamic)? onSuccess, Function(String)? onError});
@ -203,4 +207,47 @@ class ImmediateLiveCareRepoImp implements ImmediateLiveCareRepo {
return Left(UnknownFailure(e.toString()));
}
}
@override
Future<Either<Failure, GenericApiModel<List<LiveCareClinicScheduleResponse>>>> getLiveCareImmediateClinicSchedule(int age, int genderID, int serviceID,
{Function(dynamic p1)? onSuccess, Function(String p1)? onError}) async {
Map<String, dynamic> mapDevice = {
"Age": age,
"Gender": genderID,
"ServiceID": serviceID,
};
try {
GenericApiModel<List<LiveCareClinicScheduleResponse>>? apiResponse;
Failure? failure;
await apiClient.post(
GET_LIVECARE_CLINIC_TIMING,
body: mapDevice,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
// onError!(error);
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
final respObject = response['PatientER_GetClinicsServiceTimingsList'];
final liveCareScheduleObj = respObject.map((item) => LiveCareClinicScheduleResponse.fromJson(item as Map<String, dynamic>)).toList().cast<LiveCareClinicScheduleResponse>();
apiResponse = GenericApiModel<List<LiveCareClinicScheduleResponse>>(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: null,
data: liveCareScheduleObj,
);
} catch (e) {
failure = DataParsingFailure(e.toString());
}
},
);
if (failure != null) return Left(failure!);
if (apiResponse == null) return Left(ServerFailure("Unknown error"));
return Right(apiResponse!);
} catch (e) {
return Left(UnknownFailure(e.toString()));
}
}
}

@ -11,6 +11,7 @@ import 'package:hmg_patient_app_new/core/enums.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_repo.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/models/resp_models/get_livecare_clinic_schedule_response_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/models/resp_models/get_livecare_immediate_clinics_response_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/models/resp_models/get_livecare_immediate_fees_response_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/models/resp_models/get_patient_livecare_history_response_model.dart';
@ -46,6 +47,8 @@ class ImmediateLiveCareViewModel extends ChangeNotifier {
List<PatientLiveCareHistory> patientLiveCareHistoryList = [];
bool patientHasPendingLiveCareRequest = false;
List<LiveCareClinicScheduleResponse> liveCareClinicScheduleList = [];
late AppState _appState;
Duration countdownDuration = Duration(minutes: 1, seconds: 0);
@ -265,6 +268,33 @@ class ImmediateLiveCareViewModel extends ChangeNotifier {
);
}
Future<void> getLiveCareImmediateClinicSchedule({int? serviceID, Function(dynamic)? onSuccess, Function(String)? onError}) async {
liveCareClinicScheduleList.clear();
notifyListeners();
final result =
await immediateLiveCareRepo.getLiveCareImmediateClinicSchedule(_appState.getAuthenticatedUser()!.age!, _appState.getAuthenticatedUser()!.gender!, serviceID!);
result.fold(
(failure) async => await errorHandlerService.handleError(failure: failure),
(apiResponse) {
if (apiResponse.messageStatus == 2) {
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
} else if (apiResponse.messageStatus == 1) {
liveCareClinicScheduleList = apiResponse.data!;
// immediateLiveCareClinicsList.sort((a, b) => b.isOnline!.compareTo(a.isOnline!));
// isImmediateLiveCareClinicsLoading = false;
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
}
}
},
);
}
void startTimer() {
timer = Timer.periodic(const Duration(seconds: 1), (_) => addTime());
notifyListeners();

@ -0,0 +1,71 @@
class LiveCareClinicScheduleResponse {
int? iD;
int? serviceID;
int? dayOfWeek;
String? dayOfWeekStr;
bool? isActive;
String? createdOn;
String? createdBy;
bool? projectOutSA;
String? dayOfWeekStrN;
List<ShiftTimings>? shiftTimings;
LiveCareClinicScheduleResponse({this.iD, this.serviceID, this.dayOfWeek, this.dayOfWeekStr, this.isActive, this.createdOn, this.createdBy, this.projectOutSA, this.dayOfWeekStrN, this.shiftTimings});
LiveCareClinicScheduleResponse.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
serviceID = json['ServiceID'];
dayOfWeek = json['DayOfWeek'];
dayOfWeekStr = json['DayOfWeekStr'];
isActive = json['IsActive'];
createdOn = json['CreatedOn'];
createdBy = json['CreatedBy'];
projectOutSA = json['ProjectOutSA'];
dayOfWeekStrN = json['DayOfWeekStrN'];
if (json['ShiftTimings'] != null) {
shiftTimings = <ShiftTimings>[];
json['ShiftTimings'].forEach((v) {
shiftTimings!.add(new ShiftTimings.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['ServiceID'] = this.serviceID;
data['DayOfWeek'] = this.dayOfWeek;
data['DayOfWeekStr'] = this.dayOfWeekStr;
data['IsActive'] = this.isActive;
data['CreatedOn'] = this.createdOn;
data['CreatedBy'] = this.createdBy;
data['ProjectOutSA'] = this.projectOutSA;
data['DayOfWeekStrN'] = this.dayOfWeekStrN;
if (this.shiftTimings != null) {
data['ShiftTimings'] = this.shiftTimings!.map((v) => v.toJson()).toList();
}
return data;
}
}
class ShiftTimings {
String? endTime;
int? shiftID;
String? startTime;
ShiftTimings({this.endTime, this.shiftID, this.startTime});
ShiftTimings.fromJson(Map<String, dynamic> json) {
endTime = json['EndTime'];
shiftID = json['ShiftID'];
startTime = json['StartTime'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['EndTime'] = this.endTime;
data['ShiftID'] = this.shiftID;
data['StartTime'] = this.startTime;
return data;
}
}

@ -848,6 +848,9 @@ class LabViewModel extends ChangeNotifier {
Future<void> getAiOverviewLabOrders({required PatientLabOrdersResponseModel labOrder, required String loadingText}) async {
// LoadingUtils.showFullScreenLoader(loadingText: "Loading and analysing your data,\nPlease be patient and let the AI do the magic. \nPlease be patient, This might take some time.");
// LoadingUtils.showFullScreenLoader(loadingText: loadingText);
isLabAIAnalysisNeedsToBeShown = true;
notifyListeners();
LoaderBottomSheet.showLoader(
loadingText: loadingText,
showCloseButton: true,
@ -875,26 +878,29 @@ class LabViewModel extends ChangeNotifier {
final result = await labRepo.getPatientAiOverViewLabOrders(results);
result.fold(
(failure) async {
LoadingUtils.hideFullScreenLoader();
LoaderBottomSheet.hideLoader();
if (isLabAIAnalysisNeedsToBeShown) {
await errorHandlerService.handleError(failure: failure);
}
},
(apiResponse) {
LoadingUtils.hideFullScreenLoader();
LoaderBottomSheet.hideLoader();
if (apiResponse.messageStatus == 2) {
} else if (apiResponse.messageStatus == 1) {
if (isLabAIAnalysisNeedsToBeShown) {
labOrdersResponseByAi = apiResponse.data;
navigationService.push(
MaterialPageRoute(builder: (_) => LabAiAnalysisDetailedPage()),
CustomPageRoute(
direction: AxisDirection.down,
page: LabAiAnalysisDetailedPage(),
),
);
}
}
},
);
LoadingUtils.hideFullScreenLoader();
// LoadingUtils.hideFullScreenLoader();
}
Future<void> getAiOverviewSingleLabResult({required String langId, required LabResult recentLabResult, required String loadingText}) async {

@ -0,0 +1,30 @@
class AppointmentRatedResponseModel {
int? appointmentNo;
int? clinicID;
int? doctorID;
bool? isAllowedToRate;
bool? isAppointmentRated;
int? projectID;
AppointmentRatedResponseModel({this.appointmentNo, this.clinicID, this.doctorID, this.isAllowedToRate, this.isAppointmentRated, this.projectID});
AppointmentRatedResponseModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['AppointmentNo'];
clinicID = json['ClinicID'];
doctorID = json['DoctorID'];
isAllowedToRate = json['IsAllowedToRate'];
isAppointmentRated = json['IsAppointmentRated'];
projectID = json['ProjectID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AppointmentNo'] = this.appointmentNo;
data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID;
data['IsAllowedToRate'] = this.isAllowedToRate;
data['IsAppointmentRated'] = this.isAppointmentRated;
data['ProjectID'] = this.projectID;
return data;
}
}

@ -9,6 +9,7 @@ import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_favorite_doctors_list.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/appointment_rated_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/rate_appointment_resp_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/ask_doctor_request_type_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/get_tamara_installments_details_response_model.dart';
@ -81,6 +82,13 @@ abstract class MyAppointmentsRepo {
Future<Either<Failure, GenericApiModel<dynamic>>> convertPatientToCash({required int projectID});
Future<Either<Failure, GenericApiModel<dynamic>>> sendPatientUpdateRequest();
Future<Either<Failure, GenericApiModel<dynamic>>> getDoctorsRatingCheck({
required int doctorID,
required int projectID,
required int clinicID,
required int appointmentNo,
});
}
class MyAppointmentsRepoImp implements MyAppointmentsRepo {
@ -1077,4 +1085,50 @@ class MyAppointmentsRepoImp implements MyAppointmentsRepo {
return Left(UnknownFailure(e.toString()));
}
}
@override
Future<Either<Failure, GenericApiModel<AppointmentRatedResponseModel>>> getDoctorsRatingCheck({
required int doctorID,
required int projectID,
required int clinicID,
required int appointmentNo,
}) async {
Map<String, dynamic> mapDevice = {
"DoctorID": doctorID,
"ProjectID": projectID,
"ClinicID": clinicID,
"AppointmentNo": appointmentNo,
};
try {
GenericApiModel<AppointmentRatedResponseModel>? apiResponse;
Failure? failure;
await apiClient.post(
GET_DOCTORS_RATING_CHECK,
body: mapDevice,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
AppointmentRatedResponseModel appointmentRatedResponseModel = AppointmentRatedResponseModel.fromJson(response['DoctorsRatingResponseModel'][0]);
apiResponse = GenericApiModel<AppointmentRatedResponseModel>(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: errorMessage,
data: appointmentRatedResponseModel,
);
} catch (e) {
failure = DataParsingFailure(e.toString());
}
},
);
if (failure != null) return Left(failure!);
if (apiResponse == null) return Left(ServerFailure("Unknown error"));
return Right(apiResponse!);
} catch (e) {
return Left(UnknownFailure(e.toString()));
}
}
}

@ -7,6 +7,7 @@ import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_favorite_doctors_list.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/appointemnet_filters.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/appointment_rated_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/ask_doctor_request_type_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/get_tamara_installments_details_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
@ -87,6 +88,11 @@ class MyAppointmentsViewModel extends ChangeNotifier {
bool isShowNotEligibleDialog = false;
String notEligibleErrorMsg = "";
bool isAppointmentAlreadyRated = false;
AppointmentRatedResponseModel? appointmentRatedResponseModel;
bool isAppointmentRatedResponseLoading = false;
MyAppointmentsViewModel({required this.myAppointmentsRepo, required this.errorHandlerService, required this.appState});
void onTabChange(int index) {
@ -670,9 +676,9 @@ class MyAppointmentsViewModel extends ChangeNotifier {
Future<void> getPatientFavouriteDoctors({bool forceRefresh = false, Function(dynamic)? onSuccess, Function(String)? onError}) async {
// If data is already fetched and not forcing refresh, skip API call
if (isFavouriteDoctorsDataFetched && !forceRefresh) {
return;
}
// if (isFavouriteDoctorsDataFetched && !forceRefresh) {
// return;
// }
isPatientFavouriteDoctorsLoading = true;
patientFavouriteDoctorsList.clear();
@ -995,4 +1001,79 @@ class MyAppointmentsViewModel extends ChangeNotifier {
},
);
}
Future<void> getDoctorsRatingCheck({
required int doctorID,
required int projectID,
required int clinicID,
required int appointmentNo,
Function(dynamic)? onSuccess,
Function(String)? onError,
}) async {
isAppointmentRatedResponseLoading = true;
notifyListeners();
final result = await myAppointmentsRepo.getDoctorsRatingCheck(
doctorID: doctorID,
projectID: projectID,
clinicID: clinicID,
appointmentNo: appointmentNo,
);
result.fold(
(failure) async {
// await errorHandlerService.handleError(failure: failure);
if (onError != null) onError(failure.message);
isAppointmentRatedResponseLoading = false;
notifyListeners();
},
(apiResponse) {
if (apiResponse.messageStatus == 2) {
if (onError != null) onError(apiResponse.errorMessage ?? "Unknown error");
isAppointmentRatedResponseLoading = false;
notifyListeners();
} else if (apiResponse.messageStatus == 1) {
appointmentRatedResponseModel = apiResponse.data!;
isAppointmentRatedResponseLoading = false;
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse.data);
}
}
},
);
}
Future<void> submitDoctorRating(
{required PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel,
required int docRate,
required String docNote,
Function(dynamic)? onSuccess,
Function(String)? onError}) async {
final result = await myAppointmentsRepo.sendDoctorRate(
docRate,
patientAppointmentHistoryResponseModel.appointmentNo!,
patientAppointmentHistoryResponseModel.projectID!,
patientAppointmentHistoryResponseModel.doctorID!,
patientAppointmentHistoryResponseModel.clinicID!,
docNote,
patientAppointmentHistoryResponseModel.appointmentDate!,
patientAppointmentHistoryResponseModel.doctorNameObj!,
patientAppointmentHistoryResponseModel.projectName!,
patientAppointmentHistoryResponseModel.clinicName!);
result.fold(
(failure) async => await errorHandlerService.handleError(failure: failure),
(apiResponse) {
if (apiResponse.messageStatus == 2) {
onError?.call(apiResponse.errorMessage ?? 'Unknown error');
} else if (apiResponse.messageStatus == 1) {
notifyListeners();
if (onSuccess != null) {
// onSuccess(apiResponse.data);
}
}
},
);
}
}

@ -13,6 +13,8 @@ abstract class MyInvoicesRepo {
Future<Either<Failure, GenericApiModel<GetInvoiceDetailsResponseModel>>> getInvoiceDetails({required num appointmentNo, required num invoiceNo, required int projectID});
Future<Either<Failure, GenericApiModel<dynamic>>> sendInvoiceEmail({required num appointmentNo, required int projectID});
Future<Either<Failure, GenericApiModel<dynamic>>> downloadInvoice({required String setupId, required int invoiceNo, required int projectID});
}
class MyInvoicesRepoImp implements MyInvoicesRepo {
@ -138,4 +140,42 @@ class MyInvoicesRepoImp implements MyInvoicesRepo {
return Left(UnknownFailure(e.toString()));
}
}
@override
Future<Either<Failure, GenericApiModel>> downloadInvoice({required String setupId, required int invoiceNo, required int projectID}) async {
Map<String, dynamic> mapDevice = {
"SetupID": setupId,
"ProjectID": projectID,
"InvoiceNo": invoiceNo,
};
try {
GenericApiModel<dynamic>? apiResponse;
Failure? failure;
await apiClient.post(
DOWNLOAD_INVOICE_PDF,
body: mapDevice,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
apiResponse = GenericApiModel(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: null,
data: response["InvoiceReportPDFContent"],
);
} catch (e) {
failure = DataParsingFailure(e.toString());
}
},
);
if (failure != null) return Left(failure!);
if (apiResponse == null) return Left(ServerFailure("Unknown error"));
return Right(apiResponse!);
} catch (e) {
return Left(UnknownFailure(e.toString()));
}
}
}

@ -26,6 +26,8 @@ class MyInvoicesViewModel extends ChangeNotifier {
TextEditingController filterSearchController = TextEditingController();
String? selectedFilterItem;
String? downloadInvoicePDFBase64 = "";
MyInvoicesViewModel({required this.myInvoicesRepo, required this.errorHandlerService, required this.navServices});
setInvoicesListLoading() {
@ -68,7 +70,6 @@ class MyInvoicesViewModel extends ChangeNotifier {
Future<void> getInvoiceDetails({required num appointmentNo, required num invoiceNo, required int projectID, Function(dynamic)? onSuccess, Function(String)? onError}) async {
final result = await myInvoicesRepo.getInvoiceDetails(appointmentNo: appointmentNo, invoiceNo: invoiceNo, projectID: projectID);
result.fold(
(failure) async {
isInvoiceDetailsLoading = false;
@ -93,6 +94,32 @@ class MyInvoicesViewModel extends ChangeNotifier {
);
}
Future<void> downloadInvoicePDF({required String setupId, required int invoiceNo, required int projectID, Function(dynamic)? onSuccess, Function(String)? onError}) async {
final result = await myInvoicesRepo.downloadInvoice(setupId: setupId, invoiceNo: invoiceNo, projectID: projectID);
result.fold(
(failure) async {
if (onError != null) {
onError(failure.message);
}
},
(apiResponse) {
if (apiResponse.messageStatus == 2) {
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
} else if (apiResponse.messageStatus == 1) {
if (apiResponse.data != null && apiResponse.data!.isNotEmpty) {
downloadInvoicePDFBase64 = apiResponse.data!;
} else {
downloadInvoicePDFBase64 = "";
}
if (onSuccess != null) {
onSuccess(apiResponse);
}
}
},
);
}
Future<void> sendInvoiceEmail({required num appointmentNo, required int projectID, Function(dynamic)? onSuccess, Function(String)? onError}) async {
final result = await myInvoicesRepo.sendInvoiceEmail(appointmentNo: appointmentNo, projectID: projectID);

@ -54,6 +54,7 @@ abstract class SymptomsCheckerRepo {
Future<Either<Failure, GenericApiModel<List<GetClinicDetailsResponseModel>>>> getClinicDetails({
required String categoryName,
required String language,
required String userSessionToken,
});
}
@ -400,6 +401,7 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
@override
Future<Either<Failure, GenericApiModel<List<GetClinicDetailsResponseModel>>>> getClinicDetails({
required String categoryName,
required String language,
required String userSessionToken,
}) async {
Map<String, String> headers = {
@ -413,7 +415,7 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
Failure? failure;
await apiClient.get(
"${ApiConsts.getClinicFromCondition}$categoryName",
"${ApiConsts.getClinicFromCondition}$categoryName&language=$language",
apiHeaders: headers,
isExternal: true,
isAllowAny: true,

@ -1079,6 +1079,7 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
final result = await symptomsCheckerRepo.getClinicDetails(
categoryName: categoryName,
language: appState.isArabic() ? 'ar' : 'en',
userSessionToken: currentSessionAuthToken,
);

@ -13,13 +13,13 @@ class TodoSectionViewModel extends ChangeNotifier {
String? notificationsCount = "0";
initializeTodoSectionViewModel() async {
if (isAncillaryOrdersNeedReloading) {
patientAncillaryOrdersList.clear();
isAncillaryOrdersLoading = true;
// if (isAncillaryOrdersNeedReloading) {
patientAncillaryOrdersList.clear();
isAncillaryOrdersLoading = true;
isAncillaryDetailsProceduresLoading = true;
notificationsCount = "0";
getPatientOnlineAncillaryOrderList();
}
// }
getPatientDashboard();
}
@ -63,13 +63,14 @@ class TodoSectionViewModel extends ChangeNotifier {
}
Future<void> getPatientOnlineAncillaryOrderList({Function(dynamic)? onSuccess, Function(String)? onError}) async {
if (!isAncillaryOrdersNeedReloading) {
return;
}
// if (!isAncillaryOrdersNeedReloading) {
// return;
// }
patientAncillaryOrdersList.clear();
isAncillaryOrdersLoading = true;
notifyListeners();
final result = await todoSectionRepo.getOnlineAncillaryOrderList();
result.fold(

@ -0,0 +1,27 @@
import 'dart:convert';
import 'dart:io';
import 'dart:ui';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart';
import 'package:path_provider/path_provider.dart';
class RemoteFileLoader extends AssetLoader {
@override
Future<Map<String, dynamic>?> load(String path, Locale locale) async {
final directory = await getApplicationDocumentsDirectory();
// easy_localization uses toLanguageTag() which gives 'en-US' or 'ar-SA'
final fileName = "${locale.toLanguageTag()}.json";
final file = File("${directory.path}/$fileName");
if (await file.exists()) {
final String jsonString = await file.readAsString();
return jsonDecode(jsonString);
} else {
// If the download failed or hasn't happened yet, load from local assets
// path is the 'path' property from the EasyLocalization widget
final localData = await rootBundle.loadString('$path/$fileName');
return jsonDecode(localData);
}
}
}

@ -0,0 +1,36 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/api_consts.dart';
import 'package:http/http.dart' as http;
import 'package:path_provider/path_provider.dart';
class TranslationService {
// Replace with your actual hosting URL
static final String baseUrl = ApiConsts.googleCloudStorageENTranslationFileBaseURL;
static Future<void> downloadTranslations() async {
final directory = await getApplicationDocumentsDirectory();
// Ensure these match your locale codes exactly (en-US, ar-SA)
List<String> files = ["en-US.json", "ar-SA.json"];
for (String fileName in files) {
try {
final String timestamp = DateTime.now().millisecondsSinceEpoch.toString();
String url = "$baseUrl/$fileName?v=$timestamp";
debugPrint(url);
// final response = await http.get(Uri.parse("$baseUrl/$fileName"));
final response = await http.get(Uri.parse(url));
if (response.statusCode == 200) {
final file = File("${directory.path}/$fileName");
await file.writeAsBytes(response.bodyBytes);
} else {
print("Failed to download $fileName: Status ${response.statusCode}");
}
} catch (e) {
print("Network error while downloading $fileName: $e");
}
}
}
}

@ -1646,9 +1646,40 @@ abstract class LocaleKeys {
static const twoWaySubtitle = 'twoWaySubtitle';
static const toHospitalSubtitle = 'toHospitalSubtitle';
static const fromHospitalSubtitle = 'fromHospitalSubtitle';
static const clinicSchedule = 'clinicSchedule';
static const doctorAddedToFavourite = 'doctorAddedToFavourite';
static const doctorRemovedFromFavourite = 'doctorRemovedFromFavourite';
static const addNewFavorite = 'addNewFavorite';
static const favourites = 'favourites';
static const pendingAncillaryOrders = 'pendingAncillaryOrders';
static const liveCarePermissions = 'liveCarePermissions';
static const containsImage = 'containsImage';
static const servicesSelected = 'servicesSelected';
static const selectMedicalFileFromFamily = 'selectMedicalFileFromFamily';
static const anyFileFromHMG = 'anyFileFromHMG';
static const noDistance = 'noDistance';
static const enterAmount = 'enterAmount';
static const selectHospitalContinue = 'selectHospitalContinue';
static const year = 'year';
static const notifyPrescription = 'notifyPrescription';
static const doctorRatingAppointment = 'doctorRatingAppointment';
static const ratingSubmitted = 'ratingSubmitted';
static const rateTheDoctor = 'rateTheDoctor';
static const downloadInvoice = 'downloadInvoice';
static const approvalDetails = 'approvalDetails';
static const obese = 'obese';
static const overWeight = 'overWeight';
static const underWeight = 'underWeight';
static const nearestGate = 'nearestGate';
static const RRTDDetails = 'RRTDDetails';
static const normalMapType = 'normalMapType';
static const satelliteMapType = 'satelliteMapType';
static const terrainMapType = 'terrainMapType';
static const hybridMapType = 'hybridMapType';
static const openCamera = 'openCamera';
static const openGallery = 'openGallery';
static const openFiles = 'openFiles';
static const generateAiAnalysisRadResult = 'generateAiAnalysisRadResult';
static const grantLocationPermission = 'grantLocationPermission';
}

@ -41,6 +41,8 @@ import 'package:hmg_patient_app_new/features/services_price_list/services_price_
import 'package:hmg_patient_app_new/features/smartwatch_health_data/health_provider.dart';
import 'package:hmg_patient_app_new/features/symptoms_checker/symptoms_checker_view_model.dart';
import 'package:hmg_patient_app_new/features/todo_section/todo_section_view_model.dart';
import 'package:hmg_patient_app_new/features/translations/custom_asset_loader.dart';
import 'package:hmg_patient_app_new/features/translations/translation_service.dart';
import 'package:hmg_patient_app_new/features/water_monitor/water_monitor_view_model.dart';
import 'package:hmg_patient_app_new/presentation/health_calculators_and_converts/health_calculator_view_model.dart';
import 'package:hmg_patient_app_new/features/health_trackers/health_trackers_view_model.dart';
@ -95,6 +97,9 @@ Future<void> callInitializations() async {
WidgetsFlutterBinding.ensureInitialized();
await EasyLocalization.ensureInitialized();
// Download the latest JSONs from your server
// await TranslationService.downloadTranslations();
// await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
try {
@ -125,6 +130,7 @@ void main() async {
Locale('ar', 'SA'),
],
path: 'assets/langs',
// assetLoader: RemoteFileLoader(),
fallbackLocale: Locale('en', 'US'),
child: MultiProvider(providers: <SingleChildWidget>[
ChangeNotifierProvider<LabViewModel>(

@ -137,7 +137,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
style: TextStyle(
color: AppColors.textColor,
fontSize: 27.f,
fontWeight: FontWeight.w600)),
fontWeight: FontWeight.w600,)),
SizedBox(height: 16.h),
SizedBox(
height: 65.h,
@ -163,7 +163,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
style: TextStyle(
color: AppColors.textColor,
fontSize: 16,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
),
),
WidgetSpan(
@ -174,7 +174,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
style: TextStyle(
fontSize: 12,
color: AppColors.textColor,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
),
),
),
@ -184,7 +184,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
style: TextStyle(
color: AppColors.textColor,
fontSize: 16,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
),
),
],
@ -194,7 +194,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
style: TextStyle(
color: AppColors.primaryRedBorderColor,
fontSize: 12.f,
fontWeight: FontWeight.w500)),
fontWeight: FontWeight.w600,)),
SizedBox(height: 16.h),
Expanded(
child: SingleChildScrollView(
@ -630,7 +630,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
style: TextStyle(
fontSize: 12.f,
color: AppColors.greyTextColor,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
),
),
],
@ -722,7 +722,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
? AppColors.primaryRedBorderColor
: AppColors.greyTextColor,
fontSize: 11.f,
fontWeight: FontWeight.w500),
fontWeight: FontWeight.w600,),
),
SizedBox(height: 5.h),
Text("${date.day}",

@ -31,6 +31,7 @@ import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/appointment_payment_page.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_doctor_card.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_rating_widget.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/ask_doctor_request_type_select.dart';
import 'package:hmg_patient_app_new/presentation/ask_doctor/ask_doctor_page.dart';
import 'package:hmg_patient_app_new/presentation/ask_doctor/doctor_response_page.dart';
@ -74,11 +75,12 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
@override
void initState() {
scheduleMicrotask(() async {
if (!AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel)) {
// CalenderUtilsNew calendarUtils = await CalenderUtilsNew.instance;
// var doesExist = await calendarUtils.checkIfEventExist("${widget.patientAppointmentHistoryResponseModel.appointmentNo}");
// myAppointmentsViewModel.setAppointmentReminder(doesExist, widget.patientAppointmentHistoryResponseModel);
// setState(() {});
if (AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel)) {
myAppointmentsViewModel.getDoctorsRatingCheck(
doctorID: widget.patientAppointmentHistoryResponseModel.doctorID,
clinicID: widget.patientAppointmentHistoryResponseModel.clinicID,
projectID: widget.patientAppointmentHistoryResponseModel.projectID,
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo);
}
});
@ -231,53 +233,53 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
LocaleKeys.appointmentStatus.tr(context: context).toText16(isBold: true),
SizedBox(height: 4.h),
(!AppointmentType.isConfirmed(widget.patientAppointmentHistoryResponseModel)
? LocaleKeys.notConfirmed.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500)
: LocaleKeys.confirmed.tr(context: context).toText12(color: AppColors.successColor, fontWeight: FontWeight.w500)),
? LocaleKeys.notConfirmed.tr(context: context).toText12(color: AppColors.primaryRedColor, isBold: true)
: LocaleKeys.confirmed.tr(context: context).toText12(color: AppColors.successColor, isBold: true)),
SizedBox(height: 16.h),
],
),
((!AppointmentType.isConfirmed(widget.patientAppointmentHistoryResponseModel) && widget.patientAppointmentHistoryResponseModel.nextAction != 10)
? CustomButton(
text: LocaleKeys.confirm.tr(),
onPressed: () async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.confirmingAppointmentPleaseWait.tr(context: context));
await myAppointmentsViewModel.confirmAppointment(
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onSuccess: (apiResponse) {
LoaderBottomSheet.hideLoader();
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.initAppointmentsViewModel();
// myAppointmentsViewModel.getPatientAppointments(true, false);
showCommonBottomSheetWithoutHeight(
title: "",
context,
child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentConfirmedSuccessfully.tr(context: context)),
callBackFunc: () {
Navigator.pushAndRemoveUntil(
context,
CustomPageRoute(
page: LandingNavigation(),
),
(r) => false);
},
isFullScreen: false,
isCloseButtonVisible: false,
isAutoDismiss: true
);
});
},
backgroundColor: AppColors.successColor,
borderColor: AppColors.successColor,
textColor: Colors.white,
fontSize: 14.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
height: 40.h,
icon: AppAssets.confirm_appointment_icon,
iconColor: Colors.white,
iconSize: 16.h,
)
: SizedBox.shrink())
// ((!AppointmentType.isConfirmed(widget.patientAppointmentHistoryResponseModel) && widget.patientAppointmentHistoryResponseModel.nextAction != 10)
// ? CustomButton(
// text: LocaleKeys.confirm.tr(),
// onPressed: () async {
// LoaderBottomSheet.showLoader(loadingText: LocaleKeys.confirmingAppointmentPleaseWait.tr(context: context));
// await myAppointmentsViewModel.confirmAppointment(
// patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
// onSuccess: (apiResponse) {
// LoaderBottomSheet.hideLoader();
// myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
// myAppointmentsViewModel.initAppointmentsViewModel();
// // myAppointmentsViewModel.getPatientAppointments(true, false);
// showCommonBottomSheetWithoutHeight(
// title: "",
// context,
// child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentConfirmedSuccessfully.tr(context: context)),
// callBackFunc: () {
// Navigator.pushAndRemoveUntil(
// context,
// CustomPageRoute(
// page: LandingNavigation(),
// ),
// (r) => false);
// },
// isFullScreen: false,
// isCloseButtonVisible: false,
// isAutoDismiss: true
// );
// });
// },
// backgroundColor: AppColors.successColor,
// borderColor: AppColors.successColor,
// textColor: Colors.white,
// fontSize: 14.f,
// isBold: true,
// borderRadius: 12.r,
// height: 40.h,
// icon: AppAssets.confirm_appointment_icon,
// iconColor: Colors.white,
// iconSize: 16.h,
// )
// : SizedBox.shrink())
],
),
//TODO Add countdown timer in case of LiveCare Appointment
@ -290,7 +292,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.doctorWillCallYou.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.doctorWillCallYou.tr(context: context).toText14(color: AppColors.greyTextColor, isBold: true),
],
),
),
@ -336,7 +338,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
borderColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.01),
textColor: Colors.white,
fontSize: 14.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 40.h,
@ -357,12 +359,12 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
AppCustomChipWidget(
labelText: bookAppointmentsVM.isAppointmentNearestGateLoading
? "Floor: Ground Floor"
: "Floor: ${getIt.get<AppState>().isArabic() ? bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocationN : bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocation}",
).toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
: "${LocaleKeys.floor.tr(context: context)}: ${getIt.get<AppState>().isArabic() ? bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocationN : bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocation}",
).toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
AppCustomChipWidget(
labelText:
"Nearest Gate: ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}")
.toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
"${LocaleKeys.nearestGate.tr(context: context)}: ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}")
.toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
],
) : SizedBox.shrink(),
],
@ -386,7 +388,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.setReminder.tr(context: context).toText13(isBold: true),
LocaleKeys.notifyMeBeforeAppointment.tr(context: context).toText11(color: AppColors.textColorLight, weight: FontWeight.w500),
LocaleKeys.notifyMeBeforeAppointment.tr(context: context).toText11(color: AppColors.textColorLight, isBold: true),
],
),
const Spacer(),
@ -451,15 +453,16 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
],
)
// : SizedBox.shrink()
: GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
crossAxisSpacing: 16.h,
mainAxisSpacing: 16.w,
mainAxisExtent: 115.h,
),
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.zero,
: Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) {
return GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
crossAxisSpacing: 16.h,
mainAxisSpacing: 16.w,
mainAxisExtent: 115.h,
),
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.zero,
shrinkWrap: true,
children: [
MedicalFileCard(
@ -597,9 +600,48 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
page: DoctorResponsePage(),
),
);
}),
],
),
}),
myAppointmentsVM.isAppointmentRatedResponseLoading
? MedicalFileCard(
label: "Medical File",
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.appointmentRatingIcon,
isLargeText: true,
iconSize: 36.w,
isLocked: false,
).toShimmer2()
: MedicalFileCard(
label: !((myAppointmentsVM.appointmentRatedResponseModel!).isAppointmentRated ?? true)
? LocaleKeys.ratingSubmitted.tr(context: context)
: LocaleKeys.doctorRatingAppointment.tr(context: context),
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.appointmentRatingIcon,
isLargeText: true,
iconSize: 36.w,
isLocked: !(myAppointmentsVM.appointmentRatedResponseModel!.isAppointmentRated ?? true),
).onPress(() {
if(!(myAppointmentsVM.appointmentRatedResponseModel!.isAppointmentRated ?? true)) {
showCommonBottomSheetWithoutHeight(
context,
title: LocaleKeys.doctorRating.tr(context: context),
isCloseButtonVisible: true,
child: StatefulBuilder(
builder: (context, setState) {
return AppointmentRatingWidget(
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
);
},
),
isFullScreen: false,
);
}
}),
],
);
}),
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
@ -686,7 +728,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
// // "Prescribed By: ${widget.patientAppointmentHistoryResponseModel.doctorTitle} ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}"
// // .needTranslation
// // .toText10(
// // weight: FontWeight.w500,
// // weight: FontWeight.w600,
// // color: AppColors.greyTextColor,
// // letterSpacing: -0.4),
// // ],
@ -733,7 +775,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
// // // borderColor: AppColors.secondaryLightRedColor,
// // // textColor: AppColors.primaryRedColor,
// // // fontSize: 14,
// // // fontWeight: FontWeight.w500,
// // // isBold: true,
// // // borderRadius: 12.h,
// // // height: 40.h,
// // // icon: AppAssets.appointment_calendar_icon,
@ -761,7 +803,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
// // borderColor: AppColors.secondaryLightRedColor,
// // textColor: AppColors.primaryRedColor,
// // fontSize: 14.f,
// // fontWeight: FontWeight.w500,
// // isBold: true,
// // borderRadius: 12.r,
// // height: 40.h,
// // icon: AppAssets.requests,
@ -790,7 +832,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
// // borderColor: AppColors.secondaryLightRedColor,
// // textColor: AppColors.primaryRedColor,
// // fontSize: 14.f,
// // fontWeight: FontWeight.w500,
// // isBold: true,
// // borderRadius: 12.r,
// // height: 40.h,
// // icon: AppAssets.requests,
@ -843,8 +885,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
children: [
Expanded(
child: LocaleKeys.upcomingPaymentNow
.tr(context: context)
.toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor)),
.tr(context: context).toText12(isBold: true, color: AppColors.greyTextColor)),
"VAT 15%(${widget.patientAppointmentHistoryResponseModel.patientTaxAmount})".toText14(isBold: true, color: AppColors.greyTextColor, letterSpacing: -0.64),
],
),
@ -874,8 +915,9 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
?
(widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment! ||
widget.patientAppointmentHistoryResponseModel.isExecludeDoctor! ||
Utils.isClinicAllowedForRebook(widget.patientAppointmentHistoryResponseModel.clinicID))
? CustomButton(
!Utils.isClinicAllowedForRebook(widget.patientAppointmentHistoryResponseModel.clinicID))
? SizedBox.shrink()
: CustomButton(
text: LocaleKeys.rebookAppointment.tr(context: context),
onPressed: () {
openDoctorScheduleCalendar();
@ -884,15 +926,14 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
borderColor: AppColors.primaryRedColor,
textColor: Colors.white,
fontSize: 16.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 50.h,
icon: AppAssets.add_icon,
iconColor: Colors.white,
iconSize: 18.h,
).paddingSymmetrical(16.h, 24.h)
: SizedBox.shrink()
: CustomButton(
text: AppointmentType.getNextActionText(widget.patientAppointmentHistoryResponseModel.nextAction),
onPressed: () {
@ -903,7 +944,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction).withOpacity(0.01),
textColor: widget.patientAppointmentHistoryResponseModel.nextAction == 15 ? AppColors.textColor : Colors.white,
fontSize: 16.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 56.h,
@ -933,7 +974,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
SizedBox(height: 4.h),
LocaleKeys.confirmYourLocationDesc.tr(context: context).toText12(
color: AppColors.greyTextColor,
fontWeight: FontWeight.w500,
isBold: true,
),
SizedBox(height: 24.h),
CustomButton(
@ -947,7 +988,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
borderColor: AppColors.primaryRedColor,
textColor: Colors.white,
fontSize: 16.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 56.h,
@ -973,7 +1014,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
borderColor: AppColors.chipSecondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: 16.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 56.h,

@ -111,7 +111,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
Image.asset(AppAssets.mada, width: 72.h, height: 25.h)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
SizedBox(height: 16.h),
"Mada".toText16(isBold: true).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
LocaleKeys.mada.tr(context: context).toText16(isBold: true).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
],
),
SizedBox(width: 8.h),
@ -153,7 +153,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
],
).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
SizedBox(height: 16.h),
"Visa or Mastercard"
LocaleKeys.visaOrMastercard.tr(context: context)
.toText16(isBold: true)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
],
@ -193,7 +193,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
Image.asset(AppAssets.tamaraEng, width: 72.h, height: 25.h)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
SizedBox(height: 16.h),
"Tamara"
LocaleKeys.tamara.tr(context: context)
.toText16(isBold: true)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
],
@ -249,7 +249,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.insuranceExpiredOrInactive.tr(context: context)
.toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500)
.toText14(color: AppColors.primaryRedColor, isBold: true)
.paddingSymmetrical(24.h, 0.h),
CustomButton(
text: LocaleKeys.updateInsurance.tr(context: context),
@ -265,7 +265,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
borderColor: AppColors.secondaryLightRedBorderColor,
textColor: AppColors.whiteColor,
fontSize: 10.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 8,
padding: EdgeInsets.fromLTRB(15, 0, 15, 0),
height: 30.h,

@ -72,7 +72,7 @@ class AppointmentQueuePage extends StatelessWidget {
.toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading),
SizedBox(height: 8.h),
LocaleKeys.thankYouForPatience.tr(context: context)
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight)
.toText12(isBold: true, color: AppColors.textColorLight)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading),
SizedBox(height: 8.h),
myAppointmentsVM.currentPatientQueueDetails.queueNo!
@ -130,7 +130,7 @@ class AppointmentQueuePage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
"Room: ${myAppointmentsVM.patientQueueDetailsList[index].roomNo}"
.toText12(fontWeight: FontWeight.w500),
.toText12(isBold: true),
SizedBox(width: 8.w),
AppCustomChipWidget(
deleteIcon: myAppointmentsVM.patientQueueDetailsList[index].callType == 1
@ -184,19 +184,19 @@ class AppointmentQueuePage extends StatelessWidget {
),
SizedBox(height: 8.h),
"${LocaleKeys.improveOverallHealth.tr(context: context)}"
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
.toText12(isBold: true, color: AppColors.textColorLight),
SizedBox(height: 4.h),
"${LocaleKeys.routineScreenings.tr(context: context)}"
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
.toText12(isBold: true, color: AppColors.textColorLight),
SizedBox(height: 4.h),
"${LocaleKeys.whatIsThisMedicationFor.tr(context: context)}"
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
.toText12(isBold: true, color: AppColors.textColorLight),
SizedBox(height: 4.h),
"${LocaleKeys.sideEffectsToKnow.tr(context: context)}"
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
.toText12(isBold: true, color: AppColors.textColorLight),
SizedBox(height: 4.h),
"${LocaleKeys.whenFollowUp.tr(context: context)}"
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
.toText12(isBold: true, color: AppColors.textColorLight),
SizedBox(height: 16.h),
],
@ -229,7 +229,7 @@ class AppointmentQueuePage extends StatelessWidget {
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
fontSize: 16.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 50.h,

@ -113,7 +113,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
borderColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2),
textColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor,
fontSize: 12,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 10,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
@ -128,7 +128,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
borderColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.textColor.withValues(alpha: 0.2) : AppColors.primaryRedColor,
textColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor,
fontSize: 12,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 10,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
@ -191,7 +191,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
children: [
AppCustomChipWidget(
labelText:
"${myAppointmentsVM.patientAppointmentsViewList[index].patientDoctorAppointmentList!.length} Appointments"),
"${myAppointmentsVM.patientAppointmentsViewList[index].patientDoctorAppointmentList!.length} ${LocaleKeys.appointments.tr(context: context)}", isEnglishOnly: true,),
Icon(isExpanded ? Icons.expand_less : Icons.expand_more),
],
),
@ -266,7 +266,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
borderColor: Color(0xffFEE9EA),
textColor: Color(0xffED1C2B),
fontSize: 14.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 12.r,
padding: EdgeInsets.fromLTRB(10.w, 0, 10.w, 0),
height: 40.h,

@ -89,7 +89,7 @@ class _MyDoctorsPageState extends State<MyDoctorsPage> {
borderColor: isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2),
textColor: isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor,
fontSize: 12,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 10,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
@ -107,7 +107,7 @@ class _MyDoctorsPageState extends State<MyDoctorsPage> {
borderColor: isSortByClinic ? AppColors.textColor.withValues(alpha: 0.2) : AppColors.primaryRedColor,
textColor: isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor,
fontSize: 12,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 10,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
@ -234,7 +234,7 @@ class _MyDoctorsPageState extends State<MyDoctorsPage> {
SizedBox(height: 8.h),
Text(
displayName,
style: TextStyle(fontSize: 16.h, fontWeight: FontWeight.w600),
style: TextStyle(fontSize: 16.h, fontWeight: FontWeight.w600,),
overflow: TextOverflow.ellipsis,
),
],
@ -276,7 +276,7 @@ class _MyDoctorsPageState extends State<MyDoctorsPage> {
).circle(100),
SizedBox(width: 8.h),
Expanded(
child: (doctor?.doctorName ?? "").toString().toText14(weight: FontWeight.w500),
child: (doctor?.doctorName ?? "").toString().toText14(isBold: true),
),
],
),
@ -336,7 +336,7 @@ class _MyDoctorsPageState extends State<MyDoctorsPage> {
borderColor: doctor?.isActiveDoctorProfile == false ? AppColors.inputLabelTextColor.withValues(alpha: 0.01) : AppColors.secondaryLightRedColor,
textColor: doctor?.isActiveDoctorProfile == false ? AppColors.inputLabelTextColor.withValues(alpha: 1.0) : AppColors.primaryRedColor,
fontSize: 14,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 12,
padding: const EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,

@ -270,7 +270,7 @@ class AppointmentCard extends StatelessWidget {
borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
// height: isTablet || isFoldable ? 46.h : 40.h,
@ -298,7 +298,7 @@ class AppointmentCard extends StatelessWidget {
borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
// height: isTablet || isFoldable ? 46.h : 40.h,
@ -323,7 +323,7 @@ class AppointmentCard extends StatelessWidget {
borderColor: AppointmentType.getNextActionButtonColor(patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.01),
textColor: AppointmentType.getNextActionTextColor(patientAppointmentHistoryResponseModel.nextAction),
fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 40.h,
@ -403,7 +403,7 @@ class AppointmentCard extends StatelessWidget {
borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
// height: isTablet || isFoldable ? 46.h : 40.h,
@ -422,7 +422,7 @@ class AppointmentCard extends StatelessWidget {
textColor: AppColors.blackColor,
borderWidth: 1.h,
fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 40.h,

@ -120,7 +120,7 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
title.toText16(isBold: true, color: AppColors.textColor),
subTitle.toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
subTitle.toText12(isBold: true, color: AppColors.greyTextColor),
],
),
),

@ -202,7 +202,7 @@ class AppointmentDoctorCard extends StatelessWidget {
borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: 14.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 12.r,
padding: EdgeInsets.fromLTRB(10.w, 0, 10.w, 0),
height: 40.h,
@ -221,7 +221,7 @@ class AppointmentDoctorCard extends StatelessWidget {
// borderColor: AppColors.greyColor,
// textColor: AppColors.blackColor,
// fontSize: 12.f,
// fontWeight: FontWeight.w500,
// isBold: true,
// borderRadius: 12.r,
// padding: EdgeInsets.fromLTRB(10.w, 0, 10.w, 0),
// height: 40.h,
@ -242,7 +242,7 @@ class AppointmentDoctorCard extends StatelessWidget {
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
fontSize: 14.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 12.r,
height: 40.h,
icon: AppAssets.cancel,
@ -261,7 +261,7 @@ class AppointmentDoctorCard extends StatelessWidget {
borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: 14.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 12.r,
height: 40.h,
icon: AppAssets.appointment_calendar_icon,
@ -280,7 +280,7 @@ class AppointmentDoctorCard extends StatelessWidget {
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
fontSize: 14.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 12.r,
height: 40.h,
icon: AppAssets.cancel,

@ -0,0 +1,181 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/doctor_row_appointment_rating.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
import 'package:provider/provider.dart';
class AppointmentRatingWidget extends StatefulWidget {
const AppointmentRatingWidget({super.key, required this.patientAppointmentHistoryResponseModel});
final PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel;
@override
State<AppointmentRatingWidget> createState() => _AppointmentRatingWidgetState();
}
class _AppointmentRatingWidgetState extends State<AppointmentRatingWidget> {
late MyAppointmentsViewModel myAppointmentsViewModel;
late BookAppointmentsViewModel bookAppointmentsViewModel;
int rating = 0;
String notes = "";
@override
Widget build(BuildContext context) {
myAppointmentsViewModel = Provider.of<MyAppointmentsViewModel>(context, listen: false);
bookAppointmentsViewModel = Provider.of<BookAppointmentsViewModel>(context, listen: false);
return SizedBox(
height: MediaQuery.of(context).size.height * 0.6,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Scrollable main content
Expanded(
child: Padding(
padding: const EdgeInsets.only(top: 0.0, left: 0, right: 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
// Doctor row
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.r,
hasShadow: false,
),
child: BuildDoctorRowAppointmentRating(
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
)),
SizedBox(height: 16),
// Rating box
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.r,
hasShadow: false,
),
width: double.infinity,
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.rateTheDoctor.tr(context: context).toText16(isBold: true),
SizedBox(height: 12),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
...List.generate(
5,
(index) => AnimatedSwitcher(
duration: Duration(milliseconds: 1000),
switchInCurve: Curves.elasticOut,
switchOutCurve: Curves.elasticIn,
transitionBuilder: (Widget child, Animation<double> animation) {
return ScaleTransition(child: child, scale: animation);
},
child: Container(
key: ValueKey<int>(rating),
child: IconButton(
iconSize: 45.0,
onPressed: () {
setState(() {
rating = index + 1;
});
},
color: rating >= (index + 1) ? Color.fromRGBO(255, 186, 0, 1.0) : Colors.grey[400],
icon: Icon(rating >= (index + 1) ? Icons.star : Icons.star)),
),
),
)
],
),
],
),
),
),
SizedBox(height: 12),
// Note text field
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.r,
hasShadow: false,
),
child: Padding(
padding: EdgeInsets.all(16.0),
child: TextField(
maxLines: 4,
decoration: InputDecoration.collapsed(
hintText: LocaleKeys.notes.tr(context: context),
hintStyle: TextStyle(fontSize: 16.f, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16)),
onChanged: (value) {
setState(() {
notes = value;
});
},
))),
],
),
),
),
// Bottom action buttons pinned to bottom
SafeArea(
top: false,
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 12.0),
child: Row(
children: [
Expanded(
child: CustomButton(
text: LocaleKeys.later.tr(context: context),
backgroundColor: Color(0xffFEE9EA),
borderColor: Color(0xffFEE9EA),
textColor: Color(0xffED1C2B),
onPressed: () {
Navigator.pop(context);
},
),
),
SizedBox(width: 10),
Expanded(
child: CustomButton(
text: LocaleKeys.submit.tr(context: context),
onPressed: () async {
// Set up clinic rating and show clinic rating view
// appointmentRatingViewModel!.setTitle(LocaleKeys.rateDoctor.tr(context: context),);
// appointmentRatingViewModel!.setSubTitle(LocaleKeys.howWasYourLastVisitWithDoctor.tr(context: context),);
// appointmentRatingViewModel!.setClinicOrDoctor(true);
LoaderBottomSheet.showLoader();
await myAppointmentsViewModel.submitDoctorRating(docRate: rating, docNote: notes, patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel);
// await appointmentRatingViewModel!.submitClinicRating(clinicRate: rating, clinicNote: note);
LoaderBottomSheet.hideLoader();
Navigator.pop(context);
setState(() {});
},
),
),
],
),
),
),
],
),
);
}
}

@ -47,7 +47,7 @@ class AskDoctorRequestTypeSelect extends StatelessWidget {
listTileTheme: ListTileThemeData(horizontalTitleGap: 4),
),
child: RadioListTile<int>(
title: (askDoctorRequestTypeList[index].description ?? '').toText14(weight: FontWeight.w500),
title: (askDoctorRequestTypeList[index].description ?? '').toText14(isBold: true),
value: index,
fillColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.selected)) {

@ -0,0 +1,67 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/appointment_details_resp_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'dart:ui' as ui;
class BuildDoctorRowAppointmentRating extends StatelessWidget {
final PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel;
BuildDoctorRowAppointmentRating({super.key, required this.patientAppointmentHistoryResponseModel});
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.all(16),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.network(
patientAppointmentHistoryResponseModel.doctorImageURL!,
width: 63.h,
height: 63.h,
fit: BoxFit.cover,
).circle(100),
SizedBox(width: 16.h),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
patientAppointmentHistoryResponseModel.doctorNameObj!.toString().toText16(isBold: true, maxlines: 1),
SizedBox(height: 8.h),
Wrap(
direction: Axis.horizontal,
spacing: 3.h,
runSpacing: 4.h,
children: [
AppCustomChipWidget(
labelText: patientAppointmentHistoryResponseModel.projectName.toString(),
),
AppCustomChipWidget(
labelText: patientAppointmentHistoryResponseModel.clinicName.toString(),
),
Directionality(
textDirection: ui.TextDirection.ltr,
child: AppCustomChipWidget(
labelPadding: EdgeInsetsDirectional.only(start: -8.w, end: 6.w),
icon: AppAssets.ic_date_filter,
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false),
isEnglishOnly: true,
),
),
],
),
],
),
),
],
),
);
}
}

@ -82,7 +82,7 @@ class FacilitySelectionItem extends StatelessWidget {
subTitle,
style: TextStyle(
fontSize: 12.h,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
color: AppColors.greyTextColor,
),
),

@ -39,7 +39,7 @@ class FacilityTypeSelectionWidget extends StatelessWidget {
LocaleKeys.selectFacilitiesSubTitle.tr(),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
color: AppColors.greyTextColor,
),
),

@ -36,7 +36,7 @@ import '../../../emergency_services/call_ambulance/widgets/type_selection_widget
// LocaleKeys.selectHospital.tr(context: context),
// style: TextStyle(
// fontSize: 21,
// fontWeight: FontWeight.w600,
// isBold: true,
// color: AppColors.blackColor,
// ),
// ),
@ -44,7 +44,7 @@ import '../../../emergency_services/call_ambulance/widgets/type_selection_widget
// LocaleKeys.selectHospitalSubTitle.tr(context: context),
// style: TextStyle(
// fontSize: 16,
// fontWeight: FontWeight.w500,
// isBold: true,
// color: AppColors.greyTextColor,
// ),
// ),
@ -186,7 +186,7 @@ class HospitalBottomSheetBody extends StatelessWidget {
children: [
LocaleKeys.sortByLocation.tr(context: context).toText14(isBold: true),
// SizedBox(height: 4.h),
LocaleKeys.sortByNearestLocation.tr(context: context).toText11(color: AppColors.textColorLight, weight: FontWeight.w500),
LocaleKeys.sortByNearestLocation.tr(context: context).toText11(color: AppColors.textColorLight, isBold: true),
],
),
],

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
@ -7,6 +8,7 @@ import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/doctor_list_api_response.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
@ -95,7 +97,7 @@ class HospitalListItem extends StatelessWidget {
child: Row(
children: [
AppCustomChipWidget(
labelText: "Distance not available",
labelText: LocaleKeys.noDistance.tr(),
textColor: AppColors.blackColor,
),
// SizedBox(

@ -68,7 +68,7 @@ class RegionListItem extends StatelessWidget {
text: TextSpan(
text: count,
style: TextStyle(fontSize: 12.h, fontWeight: FontWeight.w700, color: AppColors.blackColor),
children: [TextSpan(text: title, style: TextStyle(fontSize: 12.h, fontWeight: FontWeight.w500, color: AppColors.blackColor))])),
children: [TextSpan(text: title, style: TextStyle(fontSize: 12.h, fontWeight: FontWeight.w600, color: AppColors.blackColor))])),
);
}
@ -93,7 +93,7 @@ class RegionListItem extends StatelessWidget {
subTitle,
style: TextStyle(
fontSize: 12.h,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
color: AppColors.greyTextColor,
),
),

@ -133,7 +133,7 @@ class _RegionBottomSheetBodyState extends State<RegionBottomSheetBody> {
// children: [
// LocaleKeys.sortByLocation.tr(context: context).toText14(isBold: true),
// // SizedBox(height: 4.h),
// LocaleKeys.sortByNearestLocation.tr(context: context).toText11(color: AppColors.textColorLight, weight: FontWeight.w500),
// LocaleKeys.sortByNearestLocation.tr(context: context).toText11(color: AppColors.textColorLight, isBold: true),
// ],
// ),
// ],

@ -203,7 +203,7 @@ class AskDoctorAppointmentCard extends StatelessWidget {
borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: 14.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
// height: isTablet || isFoldable ? 46.h : 40.h,

@ -77,7 +77,7 @@ class DoctorResponseTransactions extends StatelessWidget {
borderColor: AppColors.greyColor,
textColor: AppColors.textColor,
fontSize: 14.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 10.r,
height: 40.h,
).paddingSymmetrical(16.w, 0.h),
@ -93,7 +93,7 @@ class DoctorResponseTransactions extends StatelessWidget {
color: AppColors.infoColor.withAlpha(20),
borderRadius: BorderRadius.circular(8.r),
),
child: doctorResponseModel.requestTypeDescription!.toText12(color: AppColors.infoColor, fontWeight: FontWeight.w500),
child: doctorResponseModel.requestTypeDescription!.toText12(color: AppColors.infoColor, isBold: true),
),
],
),
@ -115,7 +115,7 @@ class DoctorResponseTransactions extends StatelessWidget {
color: AppColors.infoColor.withAlpha(20),
borderRadius: BorderRadius.circular(8.r),
),
child: doctorResponseModel.transactions![index].doctorResponse!.toText12(color: AppColors.textColor, fontWeight: FontWeight.w500),
child: doctorResponseModel.transactions![index].doctorResponse!.toText12(color: AppColors.textColor, isBold: true),
),
SizedBox(width: 8.w),
Image.network("https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", fit: BoxFit.cover, width: 42.w, height: 42.h).circle(100.r),

@ -116,7 +116,7 @@ class LoginScreenState extends State<LoginScreen> {
child: RichText(
textAlign: TextAlign.center,
text: TextSpan(
style: context.dynamicTextStyle(color: AppColors.textColor, fontSize: 14.f, height: 26 / 16, fontWeight: FontWeight.w500),
style: context.dynamicTextStyle(color: AppColors.textColor, fontSize: 14.f, height: 26 / 16, fontWeight: FontWeight.w600,),
children: <TextSpan>[
TextSpan(text: LocaleKeys.dontHaveAccount.tr(context: context), style: context.dynamicTextStyle()),
TextSpan(text: " "),
@ -126,7 +126,7 @@ class LoginScreenState extends State<LoginScreen> {
color: AppColors.primaryRedColor,
fontSize: 14.f, // Adjusted to sizer unit
height: 26 / 16, // Ratio
fontWeight: FontWeight.w500),
fontWeight: FontWeight.w600,),
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.of(context).push(

@ -49,13 +49,13 @@ class QuickLoginState extends State<QuickLogin> {
],
),
Utils.showLottie(context: context, assetPath: AppAnimations.checkmark, width: 120, height: 120, repeat: true),
LocaleKeys.allSet.tr(context: context).toText16(textAlign: TextAlign.center, weight: FontWeight.w500)
LocaleKeys.allSet.tr(context: context).toText16(textAlign: TextAlign.center, isBold: true)
// Text(
// ' TranslationBase.of(context).allSet',
// textAlign: TextAlign.center,
// style: context.dynamicTextStyle(
// fontSize: 16,
// fontWeight: FontWeight.w500,
// isBold: true,
// color: Colors.black,
// ),
// ),

@ -160,7 +160,7 @@ class _RegisterNew extends State<RegisterNew> {
children: [
Text(
LocaleKeys.iAcceptThe.tr(context: context),
style: context.dynamicTextStyle(fontSize: 14.f, fontWeight: FontWeight.w500, color: Color(0xFF2E3039)),
style: context.dynamicTextStyle(fontSize: 14.f, fontWeight: FontWeight.w600, color: Color(0xFF2E3039)),
),
GestureDetector(
onTap: () {
@ -173,7 +173,7 @@ class _RegisterNew extends State<RegisterNew> {
" ${LocaleKeys.termsConditoins.tr(context: context)}",
style: context.dynamicTextStyle(
fontSize: 14.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
color: AppColors.primaryRedColor,
decoration: TextDecoration.underline,
decorationColor: AppColors.primaryRedBorderColor,
@ -185,7 +185,7 @@ class _RegisterNew extends State<RegisterNew> {
// Expanded(
// child: Text(
// LocaleKeys.iAcceptTermsConditions.tr(context: context).split("the").first,
// style: context.dynamicTextStyle(fontSize: 14.fSize, fontWeight: FontWeight.w500, color: Color(0xFF2E3039)),
// style: context.dynamicTextStyle(fontSize: 14.fSize, isBold: true, color: Color(0xFF2E3039)),
// ),
// ),
],
@ -222,7 +222,7 @@ class _RegisterNew extends State<RegisterNew> {
color: Colors.black,
fontSize: 16.f,
height: 26 / 16,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
),
children: <TextSpan>[
TextSpan(text: LocaleKeys.alreadyHaveAccount.tr(context: context), style: context.dynamicTextStyle()),
@ -233,7 +233,7 @@ class _RegisterNew extends State<RegisterNew> {
color: AppColors.primaryRedColor,
fontSize: 16.f,
height: 26 / 16,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
),
recognizer: TapGestureRecognizer()
..onTap = () {

@ -140,7 +140,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
LocaleKeys.personalDetailsVerification.tr(context: context).toText26(color: AppColors.textColor, weight: FontWeight.w600, letterSpacing: -2),
LocaleKeys.personalDetailsVerification.tr(context: context).toText26(color: AppColors.textColor, isBold: true, letterSpacing: -2),
SizedBox(height: 24.h),
// Insurance Card Section

@ -66,6 +66,7 @@ class _SavedLogin extends State<SavedLogin> {
appBar: CustomAppBar(
onBackPressed: () {
Navigator.of(context).pop();
authVm.setIsInitialLoginNavigated(true);
},
onLanguageChanged: (value) {
context.setLocale(value == 'en' ? Locale('en', 'US') : Locale('ar', 'SA'));
@ -144,7 +145,7 @@ class _SavedLogin extends State<SavedLogin> {
borderColor: AppColors.primaryRedColor,
textColor: Colors.white,
fontSize: 12.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
height: 40.h,
padding: EdgeInsets.symmetric(vertical: 10.h),
@ -161,7 +162,7 @@ class _SavedLogin extends State<SavedLogin> {
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Text(
LocaleKeys.oR.tr(),
style: context.dynamicTextStyle(fontSize: 16.f, fontWeight: FontWeight.w500),
style: context.dynamicTextStyle(fontSize: 16.f, fontWeight: FontWeight.w600,),
),
),
SizedBox(height: 24.h),
@ -304,7 +305,7 @@ class _SavedLogin extends State<SavedLogin> {
borderColor: Color(0xffFEE9EA),
textColor: Color(0xffED1C2B),
fontSize: 16.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.fromLTRB(0, 10.h, 0, 10.h),
// icon: "assets/images/svg/apple-finder.svg",
@ -329,7 +330,7 @@ class _SavedLogin extends State<SavedLogin> {
borderColor: Color(0xffFEE9EA),
textColor: Color(0xffED1C2B),
fontSize: 15.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.fromLTRB(0, 10.h, 0, 10.h),
// icon: "assets/images/svg/apple-finder.svg",

@ -146,11 +146,11 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.city.tr().toText16(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.city.tr().toText16(color: AppColors.textColor, isBold: true),
(appState.isArabic()
? (bloodDonationVM.selectedCity?.descriptionN ?? LocaleKeys.select.tr())
: bloodDonationVM.selectedCity?.description ?? LocaleKeys.select.tr(context: context))
.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
.toText14(color: AppColors.greyTextColor, isBold: true),
],
),
],
@ -174,11 +174,11 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.gender.tr().toText16(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.gender.tr().toText16(color: AppColors.textColor, isBold: true),
(appState.isArabic()
? (bloodDonationVM.selectedGender?.typeAr ?? LocaleKeys.select.tr())
: bloodDonationVM.selectedGender?.type ?? LocaleKeys.select.tr(context: context))
.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
.toText14(color: AppColors.greyTextColor, isBold: true),
],
),
],
@ -205,12 +205,12 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.bloodType.tr().toText16(color: AppColors.textColor, weight: FontWeight.w500),
// bloodDonationVM.selectedBloodType?.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.bloodType.tr().toText16(color: AppColors.textColor, isBold: true),
// bloodDonationVM.selectedBloodType?.toText14(color: AppColors.greyTextColor, isBold: true),
(appState.isArabic()
? (bloodDonationVM.selectedBloodType ?? LocaleKeys.select.tr())
: bloodDonationVM.selectedBloodType ?? LocaleKeys.select.tr(context: context))
.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500)
.toText14(color: AppColors.greyTextColor, isBold: true)
],
),
],
@ -264,7 +264,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
children: [
Text(
"${LocaleKeys.iAcceptThe.tr()} ",
style: context.dynamicTextStyle(fontSize: 14.f, fontWeight: FontWeight.w500, color: Color(0xFF2E3039)),
style: context.dynamicTextStyle(fontSize: 14.f, fontWeight: FontWeight.w600, color: Color(0xFF2E3039)),
),
GestureDetector(
onTap: () {
@ -282,7 +282,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
LocaleKeys.termsConditoins.tr(),
style: context.dynamicTextStyle(
fontSize: 14.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
color: AppColors.primaryRedColor,
decoration: TextDecoration.underline,
decorationColor: AppColors.primaryRedBorderColor,
@ -294,7 +294,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
// Expanded(
// child: Text(
// LocaleKeys.iAcceptTermsConditions.tr().split("the").first,
// style: context.dynamicTextStyle(fontSize: 14.fSize, fontWeight: FontWeight.w500, color: Color(0xFF2E3039)),
// style: context.dynamicTextStyle(fontSize: 14.fSize, isBold: true, color: Color(0xFF2E3039)),
// ),
// ),
],
@ -365,7 +365,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
fontSize: 16.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 50.h,

@ -138,7 +138,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
fit: BoxFit.cover,
).circle(100).toShimmer2(isShow: true, radius: 50.r),
SizedBox(height: 8.h),
("Dr. John").toString().toText12(fontWeight: FontWeight.w500, isCenter: true, maxLine: 2).toShimmer2(isShow: true),
("Dr. John").toString().toText12(isBold: true, isCenter: true, maxLine: 2).toShimmer2(isShow: true),
],
);
},
@ -157,7 +157,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
LocaleKeys.recentVisits.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.w, 0.h),
Row(
children: [
LocaleKeys.viewAll.tr(context: context).toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500),
LocaleKeys.viewAll.tr(context: context).toText14(color: AppColors.primaryRedColor, isBold: true),
SizedBox(width: 2.h),
Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 14.h),
],
@ -201,7 +201,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
width: 80.w,
child: (myAppointmentsVM.patientMyDoctorsList[index].doctorName)
.toString()
.toText12(fontWeight: FontWeight.w500, isCenter: true, maxLine: 2)
.toText12(isBold: true, isCenter: true, maxLine: 2)
.toShimmer2(isShow: false),
),
],
@ -249,13 +249,14 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 24.h),
LocaleKeys.favouriteDoctors.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.w, 0.h),
LocaleKeys.favouriteList.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.w, 0.h),
SizedBox(height: 16.h),
SizedBox(
height: 110.h,
child: ListView.separated(
scrollDirection: Axis.horizontal,
itemCount: 3, // Show 3 shimmer items
itemCount: 3,
// Show 3 shimmer items
shrinkWrap: true,
padding: EdgeInsets.only(left: 24.w, right: 24.w),
itemBuilder: (context, index) {
@ -311,7 +312,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
child: Column(
children: [
Center(
child: LocaleKeys.noFavouriteDoctors.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
child: LocaleKeys.noFavouriteDoctors.tr(context: context).toText14(color: AppColors.greyTextColor, isBold: true),
),
SizedBox(height: 12.h),
CustomButton(
@ -323,7 +324,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
borderColor: Color(0xffFEE9EA),
textColor: Color(0xffED1C2B),
fontSize: 14.f,
fontWeight: FontWeight.w500,
isBold: true,
padding: EdgeInsets.fromLTRB(10.h, 0, 10.h, 0),
icon: AppAssets.add_icon,
iconColor: AppColors.primaryRedColor,
@ -339,16 +340,35 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 24.h),
LocaleKeys.favouriteDoctors.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.w, 0.h),
SizedBox(height: 16.h),
SizedBox(
LocaleKeys.favourites.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.w, 0.h),
SizedBox(height: 16.h),
SizedBox(
height: 110.h,
child: ListView.separated(
scrollDirection: Axis.horizontal,
itemCount: myAppointmentsVM.patientFavouriteDoctorsList.length,
itemCount: myAppointmentsVM.patientFavouriteDoctorsList.length + 1,
shrinkWrap: true,
padding: EdgeInsets.only(left: 24.w, right: 24.w),
itemBuilder: (context, index) {
// Last item: static "Add" button
if (index == myAppointmentsVM.patientFavouriteDoctorsList.length) {
return Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.add_new_family_icon, height: 64.h, width: 64.h),
SizedBox(
width: 80.w,
child: LocaleKeys.add.tr(context: context).toText12(
color: AppColors.textColor,
isBold: true,
isCenter: true,
).paddingOnly(top: 4.h),
),
],
).onPress(() {
Navigator.of(context).push(CustomPageRoute(page: SearchDoctorByName()));
});
}
return AnimationConfiguration.staggeredList(
position: index,
duration: const Duration(milliseconds: 1000),
@ -370,7 +390,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
width: 80.w,
child: (myAppointmentsVM.patientFavouriteDoctorsList[index].doctorName)
.toString()
.toText12(fontWeight: FontWeight.w500, isCenter: true, maxLine: 2)
.toText12(isBold: true, isCenter: true, maxLine: 2)
.toShimmer2(isShow: false),
),
],
@ -407,8 +427,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
separatorBuilder: (BuildContext cxt, int index) => SizedBox(width: 8.h),
),
),
],
);
],
);
}),
],
],
@ -451,8 +471,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.searchByClinic.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.tapToSelectClinic.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
LocaleKeys.searchByClinic.tr(context: context).toText14(color: AppColors.textColor, isBold: true),
LocaleKeys.tapToSelectClinic.tr(context: context).toText12(color: AppColors.primaryRedColor, isBold: true),
],
),
],
@ -483,8 +503,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.searchByDoctor.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.tapToSelect.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
LocaleKeys.searchByDoctor.tr(context: context).toText14(color: AppColors.textColor, isBold: true),
LocaleKeys.tapToSelect.tr(context: context).toText12(color: AppColors.primaryRedColor, isBold: true),
],
),
],
@ -513,8 +533,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.searchByRegion.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.centralRegion.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
LocaleKeys.searchByRegion.tr(context: context).toText14(color: AppColors.textColor, isBold: true),
LocaleKeys.centralRegion.tr(context: context).toText12(color: AppColors.primaryRedColor, isBold: true),
],
),
],
@ -557,8 +577,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.immediateConsultation.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.tapToSelectClinic.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
LocaleKeys.immediateConsultation.tr(context: context).toText14(color: AppColors.textColor, isBold: true),
LocaleKeys.tapToSelectClinic.tr(context: context).toText12(color: AppColors.primaryRedColor, isBold: true),
],
),
],
@ -599,8 +619,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.scheduledConsultation.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.tapToSelectClinic.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
LocaleKeys.scheduledConsultation.tr(context: context).toText14(color: AppColors.textColor, isBold: true),
LocaleKeys.tapToSelectClinic.tr(context: context).toText12(color: AppColors.primaryRedColor, isBold: true),
],
),
],
@ -640,10 +660,10 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.notSureHelpMeChooseClinic.tr(context: context).toText16(weight: FontWeight.w600, color: AppColors.textColor),
LocaleKeys.notSureHelpMeChooseClinic.tr(context: context).toText16(isBold: true, color: AppColors.textColor),
SizedBox(height: 8.h),
LocaleKeys.mentionYourSymptomsAndFindDoctors.tr(context: context).toText12(
fontWeight: FontWeight.w500,
isBold: true,
color: AppColors.greyTextColor,
),
],
@ -803,7 +823,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
getTitle(AppointmentViaRegionViewmodel data) {
if (data.selectedRegionId == null) {
return LocaleKeys.selectRegion.tr(context: context).toText20(weight: FontWeight.w600);
return LocaleKeys.selectRegion.tr(context: context).toText20(isBold: true);
} else {
return Transform.flip(
flipX: data.isArabic ? true : false,
@ -831,7 +851,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.immediateService.tr(context: context).toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.noNeedToWaitGetMedicalConsultation.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.noNeedToWaitGetMedicalConsultation.tr(context: context).toText14(color: AppColors.greyTextColor, isBold: true),
],
),
),
@ -847,7 +867,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.noVisitRequired.tr(context: context).toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.livecarePoint5.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.livecarePoint5.tr(context: context).toText14(color: AppColors.greyTextColor, isBold: true),
],
),
),
@ -863,7 +883,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.doctorWillContact.tr(context: context).toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.specialisedDoctorWillContactYou.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.specialisedDoctorWillContactYou.tr(context: context).toText14(color: AppColors.greyTextColor, isBold: true),
],
),
),
@ -879,7 +899,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.freeMedicineDelivery.tr(context: context).toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.offersFreeMedicineDelivery.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.offersFreeMedicineDelivery.tr(context: context).toText14(color: AppColors.greyTextColor, isBold: true),
],
),
),
@ -895,7 +915,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
fontSize: 16.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 12.r,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,
@ -918,7 +938,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
children: [
LocaleKeys.notSureHelpMeChooseClinic.tr(context: context).toText28(color: AppColors.textColor, isBold: true, height: 1.5),
SizedBox(height: 4.h),
LocaleKeys.mentionYourSymptomsAndFindDoctors.tr(context: context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500,),
LocaleKeys.mentionYourSymptomsAndFindDoctors.tr(context: context).toText12(color: AppColors.greyTextColor, isBold: true,),
SizedBox(height: 24.h),
CustomButton(
text: LocaleKeys.yesPleaseINeedHelp.tr(context: context),
@ -930,7 +950,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
fontSize: 16.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 12.r,
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 56.h,
@ -945,7 +965,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
borderColor: AppColors.chipSecondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: 16.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 12.r,
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 56.h,

@ -60,7 +60,7 @@ class DoctorsFilters extends StatelessWidget{
LocaleKeys.filters.tr(),
style:TextStyle(
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w600,
fontSize: 27.f,
color: AppColors.textColor,
letterSpacing: -1
@ -70,7 +70,7 @@ class DoctorsFilters extends StatelessWidget{
LocaleKeys.clearAllFilters.tr(),
style:TextStyle(
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
fontSize: 14.f,
color: AppColors.errorColor
)
@ -181,7 +181,7 @@ class DoctorsFilters extends StatelessWidget{
textColor: Colors.white,
fontSize: 16.f,
padding: EdgeInsets.zero,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 10.r,
icon: AppAssets.add_icon,
iconColor: AppColors.primaryRedColor,

@ -54,11 +54,9 @@ class DoctorProfilePage extends StatelessWidget {
doctorID: viewModel.doctorsProfileResponseModel.doctorID ?? 0,
isActive: viewModel.isFavouriteDoctor,
onSuccess: (response) {
Utils.showToast(viewModel.isFavouriteDoctor ? LocaleKeys.doctorAddedToFavourite.tr(context: context) : LocaleKeys.doctorRemovedFromFavourite.tr(context: context));
// Successfully added/removed favorite - refresh the favorites list
getIt.get<MyAppointmentsViewModel>().refreshFavouriteDoctors();
print(
viewModel.isFavouriteDoctor ? "Doctor added to favorites" : "Doctor removed from favorites",
);
},
onError: (error) {
// Revert the state on error
@ -100,7 +98,7 @@ class DoctorProfilePage extends StatelessWidget {
),
(bookAppointmentsViewModel.doctorsProfileResponseModel.specialty!.isNotEmpty ? bookAppointmentsViewModel.doctorsProfileResponseModel.specialty!.first : "")
.toString()
.toText18(weight: FontWeight.w500, color: AppColors.primaryRedColor),
.toText18(isBold: true, color: AppColors.primaryRedColor),
],
),
],
@ -139,7 +137,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),
LocaleKeys.ratings.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
LocaleKeys.ratings.tr(context: context).toText12(isBold: true, color: AppColors.greyTextColor),
bookAppointmentsViewModel.doctorsProfileResponseModel.decimalDoctorRate
.toString()
.toText16(isBold: true, color: AppColors.textColor, isUnderLine: true, decorationColor: AppColors.textColor, fontFamily: "Poppins"),
@ -160,7 +158,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),
LocaleKeys.reviews.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
LocaleKeys.reviews.tr(context: context).toText12(isBold: true, color: AppColors.greyTextColor),
NumberFormat.decimalPattern().format(bookAppointmentsViewModel.doctorsProfileResponseModel.noOfPatientsRate ?? 0)
.toText16(isBold: true, color: AppColors.textColor, isUnderLine: true, decorationColor: AppColors.textColor, fontFamily: "Poppins"),
],
@ -180,9 +178,9 @@ class DoctorProfilePage extends StatelessWidget {
SizedBox(height: 16.h),
Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h),
SizedBox(height: 16.h),
LocaleKeys.information.tr(context: context).toText14(weight: FontWeight.w600, color: AppColors.textColor),
LocaleKeys.information.tr(context: context).toText14(isBold: true, color: AppColors.textColor),
SizedBox(height: 6.h),
(bookAppointmentsViewModel.doctorsProfileResponseModel.doctorProfileInfo ?? "").trim().toText12(fontWeight: FontWeight.w600, color: AppColors.greyTextColor),
(bookAppointmentsViewModel.doctorsProfileResponseModel.doctorProfileInfo ?? "").trim().toText12(isBold: true, color: AppColors.greyTextColor),
SizedBox(height: 24.h),
],
).paddingSymmetrical(24.h, 0.h),
@ -259,7 +257,7 @@ class DoctorProfilePage extends StatelessWidget {
borderColor: AppColors.primaryRedColor,
textColor: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,

@ -118,7 +118,7 @@ class BodyPartsListing extends StatelessWidget {
textColor: _isSelected ? AppColors.chipPrimaryRedBorderColor : AppColors.blackColor,
// labelText: "${parts[index].timeDuration!} ${LocaleKeys.mins.tr()}",
richText: "${parts[index].timeDuration!} ${LocaleKeys.mins.tr()}".toText12(
fontWeight: FontWeight.w500,
isBold: true,
color: _isSelected ? AppColors.chipPrimaryRedBorderColor : AppColors.blackColor,
),
icon: AppAssets.waiting_time_clock,

@ -75,14 +75,20 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText16(isBold: true),
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText16(isBold: true, isEnglishOnly: true),
SizedBox(height: 8.h),
Wrap(
direction: Axis.horizontal,
spacing: 3.h,
runSpacing: 4.h,
children: [
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} ${LocaleKeys.yearsOld.tr(context: context)}"),
AppCustomChipWidget(
richText: Row(
children: [
"${appState.getAuthenticatedUser()!.age} ".toText10(color: AppColors.blackColor, isEnglishOnly: true),
LocaleKeys.yearsOld.tr(context: context).toText10(color: AppColors.blackColor),
],
),),
AppCustomChipWidget(labelText: "${LocaleKeys.gender.tr(context: context)}: ${appState.getAuthenticatedUser()?.gender == 1 ? LocaleKeys.malE.tr(context: context) : LocaleKeys.femaleGender.tr(context: context)}"),
],
),
@ -163,7 +169,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h),
LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, isBold: true).paddingSymmetrical(24.h, 0.h),
CustomButton(
text: LocaleKeys.updateInsurance.tr(context: context),
onPressed: () {
@ -192,7 +198,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
borderColor: AppColors.secondaryLightRedBorderColor,
textColor: AppColors.whiteColor,
fontSize: 10,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 8,
padding: EdgeInsets.fromLTRB(15, 0, 15, 0),
height: 30.h,
@ -208,7 +214,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.amount!.toText16(isBold: true), AppColors.blackColor, 13,
Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.amount!.toText16(isBold: true, isEnglishOnly: true), AppColors.blackColor, 13,
isSaudiCurrency: immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar" ||
immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "ريال"),
],
@ -218,7 +224,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
children: [
LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol(
immediateLiveCareVM.liveCareImmediateAppointmentFeesList.tax!.toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13,
immediateLiveCareVM.liveCareImmediateAppointmentFeesList.tax!.toText14(isBold: true, color: AppColors.greyTextColor, isEnglishOnly: true), AppColors.greyTextColor, 13,
isSaudiCurrency: (immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar" ||
immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "ريال")),
],
@ -228,7 +234,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SizedBox(width: 200.h, child: Utils.getPaymentMethods()),
Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.total!.toText24(isBold: true), AppColors.blackColor, 17,
Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.total!.toText24(isBold: true, isEnglishOnly: true), AppColors.blackColor, 17,
isSaudiCurrency: (immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar" ||
immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "ريال")),
],
@ -289,7 +295,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
borderColor: AppColors.successColor,
textColor: AppColors.whiteColor,
fontSize: 16,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,
@ -332,7 +338,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
borderColor: AppColors.infoColor,
textColor: AppColors.whiteColor,
fontSize: 16,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,
@ -358,7 +364,8 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
bool cameraGranted = statuses[Permission.camera]?.isGranted ?? false;
bool micGranted = statuses[Permission.microphone]?.isGranted ?? false;
bool notifGranted = statuses[Permission.notification]?.isGranted ?? false;
bool alertWindowGranted = Platform.isAndroid ? (statuses[Permission.systemAlertWindow]?.isGranted ?? false) : true;
// bool alertWindowGranted = Platform.isAndroid ? (statuses[Permission.systemAlertWindow]?.isGranted ?? false) : true;
bool alertWindowGranted = true;
// If all required permissions are already granted
if (cameraGranted && micGranted && notifGranted && alertWindowGranted) return true;
@ -374,30 +381,31 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
final permanent = missing.where((p) => (statuses[p]?.isPermanentlyDenied ?? false) || (statuses[p]?.isRestricted ?? false)).toList();
if (permanent.isNotEmpty) {
final names = permanent.map((p) => LiveCarePermissionService.instance.friendlyName(p)).join(' and ');
final message = permanent.length == 1 ? '$names permission is permanently denied. Open app settings to allow it.' : '$names permissions are permanently denied. Open app settings to allow them.';
// final message = permanent.length == 1 ? '$names permission is permanently denied. Open app settings to allow it.' : '$names permissions are permanently denied. Open app settings to allow them.';
final message = LocaleKeys.liveCarePermissions.tr();
await LiveCarePermissionService.instance.showOpenSettingsDialog(
context,
title: "Permissions Required",
title: LocaleKeys.permissionsProfile.tr(),
message: message,
);
return false;
}
// Show one combined retry dialog for all missing permissions
final missingNames = missing.map((p) => LiveCarePermissionService.instance.friendlyName(p)).join(' and ');
final retry = await showDialog<bool>(
context: context,
builder: (c) => AlertDialog(
title: const Text('Permissions required'),
content: Text('$missingNames permission${missing.length > 1 ? 's are' : ' is'} required to start the video call. Retry now?'),
actions: [
TextButton(onPressed: () => Navigator.of(c).pop(false), child: const Text('Cancel')),
TextButton(onPressed: () => Navigator.of(c).pop(true), child: const Text('Retry')),
],
),
);
if (retry != true) return false;
// final missingNames = missing.map((p) => LiveCarePermissionService.instance.friendlyName(p)).join(' and ');
// final retry = await showDialog<bool>(
// context: context,
// builder: (c) => AlertDialog(
// title: const Text('Permissions required'),
// content: Text('$missingNames permission${missing.length > 1 ? 's are' : ' is'} required to start the video call. Retry now?'),
// actions: [
// TextButton(onPressed: () => Navigator.of(c).pop(false), child: const Text('Cancel')),
// TextButton(onPressed: () => Navigator.of(c).pop(true), child: const Text('Retry')),
// ],
// ),
// );
//
// if (retry != true) return false;
// Request only the missing permissions
final newStatuses = <Permission, PermissionStatus>{};
@ -425,7 +433,8 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
return false;
}
return cameraGranted && micGranted && notifGranted && alertWindowGranted;
// return cameraGranted && micGranted && notifGranted && alertWindowGranted;
return cameraGranted && micGranted && notifGranted;
}
// Future<bool> askVideoCallPermission() async {

@ -234,7 +234,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.insuranceExpiredOrInactive.tr().toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h),
LocaleKeys.insuranceExpiredOrInactive.tr().toText14(color: AppColors.primaryRedColor, isBold: true).paddingSymmetrical(24.h, 0.h),
CustomButton(
text: LocaleKeys.updateInsurance.tr(context: context),
onPressed: () {
@ -248,7 +248,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
borderColor: AppColors.secondaryLightRedBorderColor,
textColor: AppColors.whiteColor,
fontSize: 10,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 8,
padding: EdgeInsets.fromLTRB(15, 0, 15, 0),
height: 30.h,

@ -75,27 +75,41 @@ class _ImmediateLiveCarePendingRequestPageState extends State<ImmediateLiveCareP
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
side: BorderSide(color: AppColors.ratingColorYellow, width: 3.h),
// side: BorderSide(color: AppColors.ratingColorYellow, width: 3.h),
),
child: Padding(
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Expected waiting time: ".toText16(isBold: true),
SizedBox(height: 8.h),
ValueListenableBuilder<Duration>(
valueListenable: immediateLiveCareVM.durationNotifier,
builder: (context, duration, child) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
LocaleKeys.immediateLiveCareRequest.tr(context: context).toText16(isBold: true),
SizedBox(height: 10.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Wrap(
children: [
buildTime(duration),
AppCustomChipWidget(
labelText: immediateLiveCareViewModel.patientLiveCareHistoryList.isNotEmpty ? immediateLiveCareViewModel.patientLiveCareHistoryList[0].stringCallStatus : "",
backgroundColor: AppColors.warningColorYellow.withValues(alpha: 0.20),
textColor: AppColors.alertColor,
),
SizedBox(width: 8.w),
AppCustomChipWidget(
icon: AppAssets.appointment_calendar_icon,
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(immediateLiveCareViewModel.patientLiveCareHistoryList[0].arrivalTime), false)),
],
);
},
),
Utils.buildSvgWithAssets(icon: AppAssets.waiting_icon, width: 24.h, height: 24.h),
// Lottie.asset(AppAnimations.pending_loading_animation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.cover),
],
),
SizedBox(height: 8.h),
SizedBox(height: 8.h),
LocaleKeys.yourTurnIsAfterPatients
.tr(namedArgs: {'count': (immediateLiveCareViewModel.patientLiveCareHistoryList[0].patCount ?? 0).toString()}, context: context).toText14(isBold: true),
// "Your turn is after ${immediateLiveCareViewModel.patientLiveCareHistoryList[0].patCount} patients.".toText16(isBold: true),
SizedBox(height: 8.h),
],
),
),
@ -106,38 +120,31 @@ class _ImmediateLiveCarePendingRequestPageState extends State<ImmediateLiveCareP
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
side: BorderSide(color: AppColors.ratingColorYellow, width: 3.h),
// side: BorderSide(color: AppColors.ratingColorYellow, width: 3.h),
),
child: Padding(
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppCustomChipWidget(
labelText: immediateLiveCareViewModel.patientLiveCareHistoryList.isNotEmpty ? immediateLiveCareViewModel.patientLiveCareHistoryList[0].stringCallStatus : "",
backgroundColor: AppColors.warningColorYellow.withValues(alpha: 0.20),
textColor: AppColors.alertColor,
),
Utils.buildSvgWithAssets(icon: AppAssets.waiting_icon, width: 24.h, height: 24.h),
// Lottie.asset(AppAnimations.pending_loading_animation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.cover),
],
),
SizedBox(height: 8.h),
"Hala ${appState.getAuthenticatedUser()!.firstName}!!!".toText16(isBold: true),
SizedBox(height: 8.h),
AppCustomChipWidget(
icon: AppAssets.appointment_calendar_icon,
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(immediateLiveCareViewModel.patientLiveCareHistoryList[0].arrivalTime), false)),
"Expected waiting time: ".toText16(isBold: true),
SizedBox(height: 8.h),
"Your turn is after ${immediateLiveCareViewModel.patientLiveCareHistoryList[0].patCount} patients.".toText16(isBold: true),
ValueListenableBuilder<Duration>(
valueListenable: immediateLiveCareVM.durationNotifier,
builder: (context, duration, child) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
buildTime(duration),
],
);
},
),
SizedBox(height: 8.h),
],
),
),
)
),
],
),
),
@ -158,7 +165,7 @@ class _ImmediateLiveCarePendingRequestPageState extends State<ImmediateLiveCareP
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
fontSize: 16,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,

@ -96,7 +96,9 @@ class _SelectImmediateLiveCareClinicPageState extends State<SelectImmediateLiveC
liveCareClinicListResponseModel: immediateLiveCareVM.immediateLiveCareClinicsList[index],
isLoading: immediateLiveCareVM.isImmediateLiveCareClinicsLoading,
).onPress(() {
onImmediateLiveCareClinicSelected(immediateLiveCareVM.immediateLiveCareClinicsList[index]);
if (immediateLiveCareVM.immediateLiveCareClinicsList[index].isOnline == 1) {
onImmediateLiveCareClinicSelected(immediateLiveCareVM.immediateLiveCareClinicsList[index]);
}
}),
),
),

@ -1,5 +1,6 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get_it/get_it.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
@ -10,8 +11,15 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/models/resp_models/get_livecare_immediate_clinics_response_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/livecare/widgets/select_livecare_call_type.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
class LiveCareClinicCard extends StatelessWidget {
LiveCareClinicCard({super.key, required this.liveCareClinicListResponseModel, required this.isLoading, required this.immediateLiveCareViewModel});
@ -19,10 +27,11 @@ class LiveCareClinicCard extends StatelessWidget {
GetLiveCareClinicListResponseModel liveCareClinicListResponseModel;
bool isLoading;
ImmediateLiveCareViewModel immediateLiveCareViewModel;
late AppState appState;
@override
Widget build(BuildContext context) {
AppState appState = getIt.get<AppState>();
appState = getIt.get<AppState>();
return Container(
padding: EdgeInsets.all(16.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
@ -36,10 +45,13 @@ class LiveCareClinicCard extends StatelessWidget {
Utils.buildSvgWithAssets(icon: AppAssets.generic_clinic_icon, width: 24.h, height: 24.h, fit: BoxFit.contain).toShimmer2(isShow: isLoading),
AppCustomChipWidget(
icon: AppAssets.livecare_online_icon,
iconColor: AppColors.whiteColor,
richText: (liveCareClinicListResponseModel.isOnline == 1 ? LocaleKeys.online.tr(context: context) : LocaleKeys.offline.tr()).toText10(isBold: true, color: AppColors.whiteColor),
backgroundColor: liveCareClinicListResponseModel.isOnline == 1 ? AppColors.successColor : AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
iconColor: liveCareClinicListResponseModel.isOnline == 1 ? AppColors.successColor : AppColors.primaryRedColor,
richText: (liveCareClinicListResponseModel.isOnline == 1 ? LocaleKeys.online.tr(context: context) : LocaleKeys.offline.tr()).toText12(
isBold: true,
color: liveCareClinicListResponseModel.isOnline == 1 ? AppColors.successColor : AppColors.primaryRedColor,
),
backgroundColor: AppColors.transparent,
textColor: liveCareClinicListResponseModel.isOnline == 1 ? AppColors.successColor : AppColors.primaryRedColor,
),
]),
SizedBox(height: 8.h),
@ -48,12 +60,194 @@ class LiveCareClinicCard extends StatelessWidget {
child: (isLoading ? "Cardiology" : (appState.isArabic() ? liveCareClinicListResponseModel.serviceNameN : liveCareClinicListResponseModel.serviceName))!
.toText16(isBold: true)
.toShimmer2(isShow: isLoading)),
Transform.flip(
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, width: 40.h, height: 40.h, fit: BoxFit.contain, iconColor: AppColors.textColor).toShimmer2(isShow: isLoading)),
// Transform.flip(
// flipX: appState.isArabic(),
// child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, width: 40.h, height: 40.h, fit: BoxFit.contain, iconColor: AppColors.textColor).toShimmer2(isShow: isLoading)),
]),
SizedBox(height: 8.h),
Row(
children: [
Expanded(
flex: 7,
child: CustomButton(
text: LocaleKeys.bookNow.tr(),
onPressed: () async {
onImmediateLiveCareClinicSelected(liveCareClinicListResponseModel);
},
backgroundColor: AppColors.successLightBgColor,
borderColor: AppColors.successLightBgColor,
textColor: AppColors.successColor,
borderWidth: 1.h,
fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 40.h,
icon: AppAssets.bookAppoBottom,
iconColor: liveCareClinicListResponseModel.isOnline == 0 ? AppColors.textColorLight : AppColors.successColor,
iconSize: 16.h,
isDisabled: liveCareClinicListResponseModel.isOnline == 0,
),
),
SizedBox(width: 8.w),
Expanded(
flex: 1,
child: Container(
height: (isFoldable || isTablet) ? 50.h : 40.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
// color: Color(0xFFEFEFF0),
color: AppColors.transparent,
borderRadius: 10.h,
side: BorderSide(
color: AppColors.textColor,
width: 1.2,
),
),
child: Transform.flip(
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.calendar,
iconColor: AppColors.textColor,
width: 5.w,
height: 5.h,
fit: BoxFit.scaleDown,
),
),
).onPress(() {
onClinicScheduleTapped(liveCareClinicListResponseModel.serviceID!);
}),
),
],
),
],
),
);
}
onClinicScheduleTapped(int serviceID) async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.loadingText.tr());
await immediateLiveCareViewModel.getLiveCareImmediateClinicSchedule(
serviceID: serviceID,
onSuccess: (val) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(GetIt.instance<NavigationService>().navigatorKey.currentContext!,
child: ListView.separated(
shrinkWrap: true,
itemBuilder: (_, index) {
return DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 8.h,
children: [
checkInOptionCard(AppAssets.calendarGrey, immediateLiveCareViewModel.liveCareClinicScheduleList[index].dayOfWeekStr!,
"${immediateLiveCareViewModel.liveCareClinicScheduleList[index].shiftTimings!.first.startTime} to ${immediateLiveCareViewModel.liveCareClinicScheduleList[index].shiftTimings!.first.endTime}"),
],
),
),
],
),
).paddingSymmetrical(0.h, 0.h).onPress(() {});
},
separatorBuilder: (_, __) => SizedBox(height: 16.h),
itemCount: immediateLiveCareViewModel.liveCareClinicScheduleList.length),
title: LocaleKeys.clinicSchedule.tr(),
isCloseButtonVisible: true,
useSafeArea: true,
isFullScreen: true);
});
}
onImmediateLiveCareClinicSelected(GetLiveCareClinicListResponseModel liveCareClinic) {
//TODO: add implementation to show clinic schedule
// if (liveCareClinic.isOnline == 1) {
showCommonBottomSheetWithoutHeight(GetIt.instance<NavigationService>().navigatorKey.currentContext!, child: SelectLiveCareCallType(immediateLiveCareViewModel: immediateLiveCareViewModel),
callBackFunc: () async {
if (immediateLiveCareViewModel.liveCareSelectedCallType != 0) {
immediateLiveCareViewModel.setImmediateLiveCareSelectedClinic(liveCareClinic);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingFeesPleaseWait.tr());
await immediateLiveCareViewModel.getLiveCareImmediateAppointmentFees(onSuccess: (val) {
LoaderBottomSheet.hideLoader();
Navigator.of(GetIt.instance<NavigationService>().navigatorKey.currentContext!).push(
CustomPageRoute(
page: ImmediateLiveCarePaymentDetails(),
),
);
}, onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
GetIt.instance<NavigationService>().navigatorKey.currentContext!,
child: Utils.getErrorWidget(loadingText: err),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
});
}
}, title: LocaleKeys.selectLiveCareCallType.tr(), isCloseButtonVisible: true, isFullScreen: false);
}
Widget checkInOptionCard(String icon, String title, String subTitle) {
return Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
title.toText16(isBold: true, color: AppColors.textColor),
SizedBox(height: 8.h),
Row(
children: [
AppCustomChipWidget(
icon: AppAssets.appointment_time_icon,
iconColor: AppColors.textColor,
labelText: subTitle.split("to").first.trim(),
isEnglishOnly: true,
),
SizedBox(width: 8.w),
Transform.flip(
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.arrow_forward,
height: 24.h,
width: 24.h,
iconColor: AppColors.textColor,
),
),
SizedBox(width: 8.w),
AppCustomChipWidget(
icon: AppAssets.appointment_time_icon,
iconColor: AppColors.textColor,
labelText: subTitle.split("to")[1].trim(),
isEnglishOnly: true,
),
],
),
],
),
),
],
),
],
).paddingAll(16.h),
);
}
}

@ -71,7 +71,7 @@ class SelectLiveCareCallType extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
title.toText16(isBold: true, color: AppColors.textColor),
subTitle.toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
subTitle.toText12(isBold: true, color: AppColors.greyTextColor),
],
),
),

@ -101,7 +101,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
SizedBox(height: 2.h),
(bookAppointmentsViewModel.selectedDoctor.speciality!.isNotEmpty ? bookAppointmentsViewModel.selectedDoctor.speciality!.first : "")
.toString()
.toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor, maxLine: 1),
.toText12(isBold: true, color: AppColors.greyTextColor, maxLine: 1),
],
),
],
@ -161,7 +161,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
spacing: 4.h,
runSpacing: 4.h,
children: [
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} Years Old"),
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} ${LocaleKeys.yearsOld.tr(context: context)}"),
AppCustomChipWidget(labelText: "${LocaleKeys.gender.tr(context: context)}: ${appState.getAuthenticatedUser()?.gender == 1 ? LocaleKeys.malE.tr(context: context) : LocaleKeys.femaleGender.tr(context: context)}"),
],
),
@ -197,12 +197,12 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
AppCustomChipWidget(
labelText: bookAppointmentsVM.isAppointmentNearestGateLoading
? "Floor: Ground Floor"
: "Floor: ${getIt.get<AppState>().isArabic() ? bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocationN : bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocation}",
).toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
: "${LocaleKeys.floor.tr(context: context)} ${getIt.get<AppState>().isArabic() ? bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocationN : bookAppointmentsViewModel.appointmentNearestGateResponseModel!.clinicLocation}",
).toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
AppCustomChipWidget(
labelText:
"Nearest Gate: ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}")
.toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
"${LocaleKeys.nearestGate.tr(context: context)} ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}")
.toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
],
)
: SizedBox.shrink(),
@ -235,7 +235,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
borderColor: AppColors.primaryRedColor,
textColor: Colors.white,
fontSize: 16.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,

@ -154,7 +154,7 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
// borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withOpacity(0.2),
// textColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor,
// fontSize: 12,
// fontWeight: FontWeight.w500,
// isBold: true,
// borderRadius: 10,
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
// height: 40.h,
@ -169,7 +169,7 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
// borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.textColor.withOpacity(0.2) : AppColors.primaryRedColor,
// textColor: bookAppointmentsVM.isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor,
// fontSize: 12,
// fontWeight: FontWeight.w500,
// isBold: true,
// borderRadius: 10,
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
// height: 40.h,
@ -306,7 +306,7 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
// borderColor: AppColors.greyColor,
// textColor: AppColors.blackColor,
// fontSize: 10,
// fontWeight: FontWeight.w500,
// isBold: true,
// borderRadius: 8,
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
// height: 30.h),
@ -319,7 +319,7 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
// bookAppointmentsVM.isSortByClinic
// ? (groupedDoctors[index].first.clinicName ?? 'Unknown')
// : (groupedDoctors[index].first.projectName ?? 'Unknown'),
// style: TextStyle(fontSize: 16.h, fontWeight: FontWeight.w600),
// style: TextStyle(fontSize: 16.h, isBold: true),
// overflow: TextOverflow.ellipsis,
// ),
// // Expanded content - list of doctors in this group
@ -440,7 +440,7 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
fontSize: 16.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 10.r,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,

@ -98,7 +98,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
borderRadius: 12.r,
fontWeight: FontWeight.w500),
fontWeight: FontWeight.w600,),
),
child: getCalculatorResultWidget(type: widget.calculatorType!, calculatedResult: widget.calculatedResult).paddingSymmetrical(18.w, 24.h),
);
@ -619,7 +619,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
SizedBox(
width: 8.w,
),
calculatedResult["lastPeriodDate"].toString().toText16(color: AppColors.successColor, weight: FontWeight.w600),
calculatedResult["lastPeriodDate"].toString().toText16(color: AppColors.successColor, isBold: true),
],
),
],
@ -641,7 +641,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
SizedBox(
width: 8.w,
),
calculatedResult["ovulationDate"].toString().toText16(color: AppColors.successColor, weight: FontWeight.w600),
calculatedResult["ovulationDate"].toString().toText16(color: AppColors.successColor, isBold: true),
],
),
SizedBox(height: 8.h),
@ -655,7 +655,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
borderRadius: 8.h,
textColor: AppColors.textColor),
SizedBox(height: 16.h),
"Fertility Window".toText16(color: AppColors.textColor, weight: FontWeight.w600),
"Fertility Window".toText16(color: AppColors.textColor, isBold: true),
SizedBox(height: 8.h),
Row(
children: [
@ -663,7 +663,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
SizedBox(
width: 8.w,
),
calculatedResult["fertileWindowStart"].toString().toText13(color: AppColors.successColor, weight: FontWeight.w600),
calculatedResult["fertileWindowStart"].toString().toText13(color: AppColors.successColor, isBold: true),
SizedBox(
width: 4.w,
),
@ -671,12 +671,12 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
SizedBox(
width: 4.w,
),
calculatedResult["fertileWindowEnd"].toString().toText13(color: AppColors.successColor, weight: FontWeight.w600),
calculatedResult["fertileWindowEnd"].toString().toText13(color: AppColors.successColor, isBold: true),
],
),
SizedBox(height: 8.h),
"This is your fertile window. Maintaining a healthy calorie range supports your body during this period, considering your Basal Metabolic Rate and activity. Your Body Mass Index is within the healthy range."
.toText12(height: 1.5, color: AppColors.textColorLight, fontWeight: FontWeight.w500)
.toText12(height: 1.5, color: AppColors.textColorLight, isBold: true)
],
),
),
@ -697,7 +697,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
),
Row(
children: [
"Tips to keep in mind".toText16(color: AppColors.textColor, weight: FontWeight.w600),
"Tips to keep in mind".toText16(color: AppColors.textColor, isBold: true),
],
),
],
@ -735,7 +735,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.pregnancyDueDateAccordion, width: 30.h, height: 30.h),
SizedBox(width: 8.w),
calculatedResult["dueDate"].toString().toText16(color: AppColors.successColor, weight: FontWeight.w600),
calculatedResult["dueDate"].toString().toText16(color: AppColors.successColor, isBold: true),
],
),
Expanded(child: SizedBox(width: 8.w)),
@ -762,7 +762,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
children: [
Row(
children: [
"First Trimester".toText16(color: AppColors.textColor, weight: FontWeight.w600),
"First Trimester".toText16(color: AppColors.textColor, isBold: true),
Expanded(child: SizedBox(width: 8.h)),
CustomChipWidget(
height: 30.h,
@ -782,7 +782,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
SizedBox(
width: 8.w,
),
calculatedResult["firstTrimester"]["start"].toString().toText13(color: AppColors.successColor, weight: FontWeight.w600),
calculatedResult["firstTrimester"]["start"].toString().toText13(color: AppColors.successColor, isBold: true),
SizedBox(
width: 4.w,
),
@ -790,7 +790,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
SizedBox(
width: 4.w,
),
calculatedResult["firstTrimester"]["end"].toString().toText13(color: AppColors.successColor, weight: FontWeight.w600),
calculatedResult["firstTrimester"]["end"].toString().toText13(color: AppColors.successColor, isBold: true),
],
),
SizedBox(height: 8.h),
@ -806,7 +806,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
children: [
Row(
children: [
"Second Trimester".toText16(color: AppColors.textColor, weight: FontWeight.w600),
"Second Trimester".toText16(color: AppColors.textColor, isBold: true),
Expanded(child: SizedBox(width: 8.h)),
CustomChipWidget(
height: 30.h,
@ -826,7 +826,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
SizedBox(
width: 8.w,
),
calculatedResult["secondTrimester"]["start"].toString().toText13(color: AppColors.successColor, weight: FontWeight.w600),
calculatedResult["secondTrimester"]["start"].toString().toText13(color: AppColors.successColor, isBold: true),
SizedBox(
width: 4.w,
),
@ -834,7 +834,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
SizedBox(
width: 4.w,
),
calculatedResult["secondTrimester"]["end"].toString().toText13(color: AppColors.successColor, weight: FontWeight.w600),
calculatedResult["secondTrimester"]["end"].toString().toText13(color: AppColors.successColor, isBold: true),
],
),
SizedBox(height: 8.h),
@ -850,7 +850,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
children: [
Row(
children: [
"Third Trimester".toText16(color: AppColors.textColor, weight: FontWeight.w600),
"Third Trimester".toText16(color: AppColors.textColor, isBold: true),
Expanded(child: SizedBox(width: 8.h)),
CustomChipWidget(
height: 30.h,
@ -870,7 +870,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
SizedBox(
width: 8.w,
),
calculatedResult["thirdTrimester"]["start"].toString().toText13(color: AppColors.successColor, weight: FontWeight.w600),
calculatedResult["thirdTrimester"]["start"].toString().toText13(color: AppColors.successColor, isBold: true),
SizedBox(
width: 4.w,
),
@ -878,7 +878,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
SizedBox(
width: 4.w,
),
calculatedResult["thirdTrimester"]["end"].toString().toText13(color: AppColors.successColor, weight: FontWeight.w600),
calculatedResult["thirdTrimester"]["end"].toString().toText13(color: AppColors.successColor, isBold: true),
],
),
SizedBox(height: 8.h),
@ -904,7 +904,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
),
),
Expanded(
child: text.toText12(color: AppColors.textColorLight, fontWeight: FontWeight.w500, height: 1.2.h),
child: text.toText12(color: AppColors.textColorLight, isBold: true, height: 1.2.h),
),
],
);
@ -924,7 +924,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
children: [
('${calories.toStringAsFixed(0)}').toText32(color: getTextColor(title), isBold: true),
SizedBox(width: 10.w),
hide ? SizedBox() : 'kcal/day'.toText12(color: AppColors.inputLabelTextColor, isBold: true, fontWeight: FontWeight.w600)
hide ? SizedBox() : 'kcal/day'.toText12(color: AppColors.inputLabelTextColor, isBold: true)
],
),
_buildStatusIcon(title)
@ -950,9 +950,9 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
),
SizedBox(height: 8.h),
],
title.toText16(color: AppColors.textColor, weight: FontWeight.w600),
title.toText16(color: AppColors.textColor, isBold: true),
SizedBox(height: 8.h),
description.toText12(height: 1.2.h, color: AppColors.textColorLight, fontWeight: FontWeight.w500)
description.toText12(height: 1.2.h, color: AppColors.textColorLight, isBold: true)
],
),
);
@ -1064,24 +1064,27 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
);
}
} else {
if (clinic.clinicID == 253) {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.loadingText.tr(context: context));
await bookAppointmentsViewModel.getLaserHospitals(
onSuccess: (_) {
LoaderBottomSheet.hideLoader();
_showLaserHospitalBottomSheet();
},
onError: (err) {
LoaderBottomSheet.hideLoader();
},
);
return;
}
// if (clinic.clinicID == 253) {
// LoaderBottomSheet.showLoader(loadingText: LocaleKeys.loadingText.tr(context: context));
// await bookAppointmentsViewModel.getLaserHospitals(
// onSuccess: (_) {
// LoaderBottomSheet.hideLoader();
// _showLaserHospitalBottomSheet();
// },
// onError: (err) {
// LoaderBottomSheet.hideLoader();
// },
// );
// return;
// }
var bottomSheetType = RegionBottomSheetType.FOR_CLINIIC;
if (clinic.clinicID == 17) {
regionalViewModel.setBottomSheetState(AppointmentViaRegionState.HOSPITAL_SELECTION);
bottomSheetType = RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER;
}
// if (clinic.clinicID == 253) {
// bottomSheetType = RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER;
// }
openRegionListBottomSheet(context, bottomSheetType);
}
}
@ -1122,10 +1125,19 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
regionalViewModel.handleLastStepForRegion();
} else if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_CLINIIC) {
regionalViewModel.setBottomSheetState(AppointmentViaRegionState.DOCTOR_SELECTION);
regionalViewModel.handleLastStepForClinic();
var appointmentsViewModel = Provider.of<BookAppointmentsViewModel>(context, listen: false);
if (appointmentsViewModel.selectedClinic.clinicID == 253) {
appointmentsViewModel.setProjectID(regionalViewModel.selectedHospital?.patientDoctorAppointmentList!.first.iD?.toString() ?? "");
appointmentsViewModel.resetLaserData();
appointmentsViewModel.getLaserClinic();
regionalViewModel.handleLastStepForClinicForDentalAndLaser(appointmentsViewModel.selectedClinic.clinicID ?? -1);
} else {
regionalViewModel.handleLastStepForClinic();
}
} else if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER) {
var appointmentsViewModel = Provider.of<BookAppointmentsViewModel>(context, listen: false);
regionalViewModel.setBottomSheetState(AppointmentViaRegionState.DOCTOR_SELECTION);
appointmentsViewModel.setProjectID(regionalViewModel.selectedHospital?.hospitalList.first.iD?.toString() ?? "");
regionalViewModel.handleLastStepForClinicForDentalAndLaser(appointmentsViewModel.selectedClinic.clinicID ?? -1);
}
},
@ -1157,12 +1169,18 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
}
}
if (bookAppointmentsViewModel.selectedClinic.clinicID == 253) {
{
bookAppointmentsViewModel.resetLaserData();
bookAppointmentsViewModel.getLaserClinic();
}
}
// if (bookAppointmentsViewModel.selectedClinic.clinicID == 253) {
// // {
// // bookAppointmentsViewModel.resetLaserData();
// // bookAppointmentsViewModel.getLaserClinic();
// // Navigator.push(
// // context,
// // CustomPageRoute(
// // page: LaserAppointment(),
// // ),
// // );
// // }
// }
bookAppointmentsViewModel.setProjectID(id);
return SizedBox.shrink();
} else {
@ -1173,7 +1191,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
getTitle(AppointmentViaRegionViewmodel data) {
if (data.selectedRegionId == null) {
return LocaleKeys.selectRegion.tr(context: context).toText20(weight: FontWeight.w600);
return LocaleKeys.selectRegion.tr(context: context).toText20(isBold: true);
} else {
return Transform.flip(
flipX: data.isArabic ? true : false,
@ -1201,7 +1219,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.youHaveExistingTreatmentPlan.tr(context: context).toText14(weight: FontWeight.w500),
LocaleKeys.youHaveExistingTreatmentPlan.tr(context: context).toText14(isBold: true),
SizedBox(height: 8.h),
Container(
width: double.infinity,
@ -1256,7 +1274,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
),
),
SizedBox(height: 16.h),
LocaleKeys.wouldYouLikeToContinue.tr(context: context).toText14(weight: FontWeight.w500),
LocaleKeys.wouldYouLikeToContinue.tr(context: context).toText14(isBold: true),
SizedBox(height: 16.h),
Row(
children: [

@ -88,7 +88,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
// backgroundColor: AppColors.primaryRedColor,
// borderColor: AppColors.primaryRedColor,
// borderRadius: 12.r,
// fontWeight: FontWeight.w500),
// isBold: true),
// ),
child: SingleChildScrollView(
controller: _scrollController,
@ -167,14 +167,14 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
? GestureDetector(
onTap: () {
searchEditingController.clear();
bookAppointmentsViewModel.filterClinics("");
bookAppointmentsViewModel.filterDoctors("");
textFocusNode.unfocus();
},
child: Utils.buildSvgWithAssets(icon: AppAssets.close_bottom_sheet_icon, width: 20.h, height: 20.h, fit: BoxFit.scaleDown),
)
: null,
onChange: (value) {
bookAppointmentsViewModel.filterClinics(value!);
bookAppointmentsViewModel.filterDoctors(value ?? "");
},
padding: EdgeInsets.symmetric(
vertical: ResponsiveExtension(10).h,
@ -197,7 +197,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withOpacity(0.2),
textColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor,
fontSize: 12,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 10,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
@ -212,7 +212,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.textColor.withOpacity(0.2) : AppColors.primaryRedColor,
textColor: bookAppointmentsVM.isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor,
fontSize: 12,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 10,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
@ -229,7 +229,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
children: [
LocaleKeys.nearestAppo.tr(context: context).toText13(isBold: true),
SizedBox(height: 4.h),
LocaleKeys.viewNearestAppos.tr(context: context).toText11(color: AppColors.textColorLight, weight: FontWeight.w500),
LocaleKeys.viewNearestAppos.tr(context: context).toText11(color: AppColors.textColorLight, isBold: true),
],
),
const Spacer(),
@ -303,7 +303,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
borderColor: AppColors.greyColor,
textColor: AppColors.blackColor,
fontSize: 10,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 8,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 30.h,
@ -317,7 +317,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
bookAppointmentsVM.isSortByClinic
? (bookAppointmentsVM.doctorsListGrouped[index].first.clinicName ?? 'Unknown')
: (bookAppointmentsVM.doctorsListGrouped[index].first.projectName ?? 'Unknown'),
style: TextStyle(fontSize: 16.h, fontWeight: FontWeight.w600),
style: TextStyle(fontSize: 16.h, fontWeight: FontWeight.w600,),
overflow: TextOverflow.ellipsis,
),
// Expanded content - list of doctors in this group

@ -55,7 +55,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.immediateService.tr(context: context).toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.noNeedToWaitGetMedicalConsultation.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.noNeedToWaitGetMedicalConsultation.tr(context: context).toText14(color: AppColors.greyTextColor, isBold: true),
],
),
),
@ -71,7 +71,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.noVisitRequired.tr(context: context).toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.livecarePoint5.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.livecarePoint5.tr(context: context).toText14(color: AppColors.greyTextColor, isBold: true),
],
),
),
@ -87,7 +87,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.doctorWillContact.tr(context: context).toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.specialisedDoctorWillContactYou.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.specialisedDoctorWillContactYou.tr(context: context).toText14(color: AppColors.greyTextColor, isBold: true),
],
),
),
@ -103,7 +103,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.freeMedicineDelivery.tr(context: context).toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.offersFreeMedicineDelivery.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.offersFreeMedicineDelivery.tr(context: context).toText14(color: AppColors.greyTextColor, isBold: true),
],
),
),
@ -152,7 +152,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
fontSize: 16.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 10.r,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,
@ -171,7 +171,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: 16.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 10.r,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,

@ -98,7 +98,7 @@ class WaitingAppointmentInfo extends StatelessWidget {
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
fontSize: 16,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,

@ -63,20 +63,20 @@ class WaitingAppointmentOnlineCheckinSheet extends StatelessWidget {
});
}),
SizedBox(height: 16.h),
checkInOptionCard(
AppAssets.checkin_nfc_icon,
LocaleKeys.nfcNearFieldCommunication.tr(),
LocaleKeys.scanPhoneViaNFC.tr(),
).onPress(() {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
checkScannedNFCAndQRCode(nfcId, context);
});
}, onCancel: () {});
});
}),
SizedBox(height: 16.h),
// checkInOptionCard(
// AppAssets.checkin_nfc_icon,
// LocaleKeys.nfcNearFieldCommunication.tr(),
// LocaleKeys.scanPhoneViaNFC.tr(),
// ).onPress(() {
// Future.delayed(const Duration(milliseconds: 500), () {
// showNfcReader(context, onNcfScan: (String nfcId) {
// Future.delayed(const Duration(milliseconds: 100), () {
// checkScannedNFCAndQRCode(nfcId, context);
// });
// }, onCancel: () {});
// });
// }),
// SizedBox(height: 16.h),
checkInOptionCard(
AppAssets.checkin_qr_icon,
LocaleKeys.qrCode.tr(),
@ -111,7 +111,7 @@ class WaitingAppointmentOnlineCheckinSheet extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
title.toText16(isBold: true, color: AppColors.textColor),
subTitle.toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
subTitle.toText12(isBold: true, color: AppColors.greyTextColor),
],
),
),

@ -244,7 +244,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500)
LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, isBold: true)
.paddingSymmetrical(24.h, 0.h),
CustomButton(
text: LocaleKeys.updateInsurance.tr(context: context),
@ -259,7 +259,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
borderColor: AppColors.secondaryLightRedBorderColor,
textColor: AppColors.whiteColor,
fontSize: 10.f,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
borderRadius: 8,
padding: EdgeInsets.fromLTRB(15, 0, 15, 0),
height: 30.h,

@ -82,7 +82,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
// Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// "Pick a Date".toText20(weight: FontWeight.w600).expanded,
// "Pick a Date".toText20(isBold: true).expanded,
// Utils.buildSvgWithAssets(icon: AppAssets.close_bottom_sheet_icon, iconColor: Color(0xff2B353E)).onPress(() {
// Navigator.of(context).pop();
// }),
@ -147,7 +147,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
SizedBox(height: 10.h),
Transform.translate(
offset: const Offset(0.0, -10.0),
child: selectedDateDisplay.toText16(weight: FontWeight.w500, isEnglishOnly: true),
child: selectedDateDisplay.toText16(isBold: true, isEnglishOnly: true),
),
//TODO: Add Next Day Span here
dayEvents.isNotEmpty
@ -269,7 +269,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
borderColor: AppColors.primaryRedColor,
textColor: Colors.white,
fontSize: 16.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 10.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 50.h,
@ -349,14 +349,14 @@ class TimeSlotChip extends StatelessWidget {
? Container(
padding: EdgeInsets.symmetric(horizontal: 14.h, vertical: 8.h),
decoration: ShapeDecoration(
color: isSelected ? AppColors.warningColorYellow : AppColors.textColor,
color: isSelected ? AppColors.warningColorYellow : AppColors.whiteColor,
shape: SmoothRectangleBorder(
borderRadius: BorderRadius.circular(8.h),
smoothness: 1,
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, isEnglishOnly: true),
child: label.toText12(color: isSelected ? AppColors.whiteColor : Colors.black87, isBold: true, isEnglishOnly: true),
)
: Container(
padding: EdgeInsets.symmetric(horizontal: 14.h, vertical: 8.h),
@ -368,7 +368,7 @@ class TimeSlotChip extends StatelessWidget {
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),
child: label.toText12(color: isSelected ? AppColors.primaryRedColor : AppColors.textColor, isBold: true, isEnglishOnly: true),
),
);
}

@ -1,6 +1,8 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
@ -103,13 +105,20 @@ class DoctorCard extends StatelessWidget {
SizedBox(
child: (isLoading
? "Consultant Cardiologist"
: doctorsListResponseModel.speciality!.isNotEmpty
? (doctorsListResponseModel.speciality!.first.length > 32
? '${doctorsListResponseModel.speciality!.first.substring(0, 32)}...'
: doctorsListResponseModel.speciality!.first)
: (getIt.get<AppState>().isArabic() && doctorsListResponseModel.specialityN != null)
? doctorsListResponseModel.specialityN!.isNotEmpty
? (doctorsListResponseModel.specialityN!.first.length > 32
? '${doctorsListResponseModel.specialityN!.first.substring(0, 32)}...'
: doctorsListResponseModel.specialityN!.first)
: ""
: doctorsListResponseModel.speciality != null ?
doctorsListResponseModel.speciality!.isNotEmpty
? (doctorsListResponseModel.speciality!.first.length > 32
? '${doctorsListResponseModel.speciality!.first.substring(0, 32)}...'
: doctorsListResponseModel.speciality!.first) : ""
: "")
.toString()
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColor, maxLine: 2, isEnglishOnly: true)
.toText12(isBold: true, color: AppColors.textColor, maxLine: 2, isEnglishOnly: true)
.toShimmer2(isShow: isLoading),
),
SizedBox(width: 6.w),
@ -253,7 +262,7 @@ class DoctorCard extends StatelessWidget {
borderColor: Color(0xffFEE9EA),
textColor: Color(0xffED1C2B),
fontSize: 14.f,
fontWeight: FontWeight.w500,
isBold: true,
borderRadius: 10.r,
padding: EdgeInsets.fromLTRB(10.h, 0, 10.h, 0),
height: 40.h,

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save