From f78eb5da677bb41a3208f0a1fbe365eacf001390 Mon Sep 17 00:00:00 2001 From: tahaalam Date: Mon, 26 Jan 2026 11:18:52 +0300 Subject: [PATCH] Wd: Unware clinic bottom sheet shown on appointment page. --- assets/langs/ar-SA.json | 6 +- assets/langs/en-US.json | 5 +- lib/generated/locale_keys.g.dart | 2 + .../book_appointment_page.dart | 71 ++++++++++++++++--- 4 files changed, 71 insertions(+), 13 deletions(-) diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 90103c0..49b03c9 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -1524,7 +1524,7 @@ "medicalServices": "الخدمات الطبية", "insuranceAndPayments": "التأمين والمدفوعات", "trackerAndOthers": "المتتبع وأخرى", - "bmi": "مؤشر كتلة الجسم" - - + "bmi": "مؤشر كتلة الجسم", + "yesPleaseINeedHelp": "نعم، من فضلك أريد المساعدة", + "noThanksIKnowTheClinic": "لا شكراً، أعرف العيادة" } diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index 50d4481..e2e3f14 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -1515,7 +1515,8 @@ "medicalServices": "Medical Services", "insuranceAndPayments": "Insurance & Payments", "trackerAndOthers": "Tracker & Others", - "bmi": "BMI" - + "bmi": "BMI", + "yesPleaseINeedHelp": "Yes, Please I need help", + "noThanksIKnowTheClinic": "No, Thanks. I Know the clinic" } diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 41cb64f..44951a5 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -1512,5 +1512,7 @@ abstract class LocaleKeys { static const insuranceAndPayments = 'insuranceAndPayments'; static const trackerAndOthers = 'trackerAndOthers'; static const bmi = 'bmi'; + static const yesPleaseINeedHelp = 'yesPleaseINeedHelp'; + static const noThanksIKnowTheClinic = 'noThanksIKnowTheClinic'; } diff --git a/lib/presentation/book_appointment/book_appointment_page.dart b/lib/presentation/book_appointment/book_appointment_page.dart index b95e0c2..cf5eef3 100644 --- a/lib/presentation/book_appointment/book_appointment_page.dart +++ b/lib/presentation/book_appointment/book_appointment_page.dart @@ -60,6 +60,9 @@ class _BookAppointmentPageState extends State { bookAppointmentsViewModel.getLocation(); immediateLiveCareViewModel.initImmediateLiveCare(); }); + WidgetsBinding.instance.addPostFrameCallback((_) { + showUnKnownClinicBottomSheet(); + }); super.initState(); } @@ -313,10 +316,10 @@ class _BookAppointmentPageState extends State { ], ).paddingSymmetrical(24.h, 0.h); case 1: - //TODO: Get LiveCare type Select UI from Hussain + //TODO: Get LiveCare type Select UI from Hussain return appState.isAuthenticated ? Column( - children: [ + children: [ Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( color: AppColors.whiteColor, @@ -447,9 +450,9 @@ class _BookAppointmentPageState extends State { LocaleKeys.notSureHelpMeChooseClinic.tr(context: context).toText16(weight: FontWeight.w600, color: AppColors.textColor), SizedBox(height: 8.h), LocaleKeys.mentionYourSymptomsAndFindDoctors.tr(context: context).toText12( - fontWeight: FontWeight.w500, - color: AppColors.greyTextColor, - ), + fontWeight: FontWeight.w500, + color: AppColors.greyTextColor, + ), ], ), ), @@ -470,10 +473,13 @@ class _BookAppointmentPageState extends State { regionalViewModel.flush(); regionalViewModel.setBottomSheetType(type); // AppointmentViaRegionViewmodel? viewmodel = null; - showCommonBottomSheetWithoutHeight(context, title: "", titleWidget: Consumer(builder: (_, data, __) => getTitle(data)), isDismissible: false, + showCommonBottomSheetWithoutHeight(context, title: "", + titleWidget: Consumer(builder: (_, data, __) => getTitle(data)), + isDismissible: false, child: Consumer(builder: (_, data, __) { - return getRegionalSelectionWidget(data); - }), callBackFunc: () {}); + return getRegionalSelectionWidget(data); + }), + callBackFunc: () {}); } Widget getRegionalSelectionWidget(AppointmentViaRegionViewmodel data) { @@ -632,4 +638,53 @@ class _BookAppointmentPageState extends State { ], ).paddingSymmetrical(24.h, 0.h); } + + void showUnKnownClinicBottomSheet() { + showCommonBottomSheetWithoutHeight( + context, + title: "", + isDismissible: true, + isCloseButtonVisible: false, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + 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,), + SizedBox(height: 24.h), + CustomButton( + text: LocaleKeys.yesPleaseINeedHelp.tr(context: context), + onPressed: () { + context.pop(); + context.navigateWithName(AppRoutes.userInfoSelection); + }, + backgroundColor: AppColors.primaryRedColor, + borderColor: AppColors.primaryRedColor, + textColor: AppColors.whiteColor, + fontSize: 16.f, + fontWeight: FontWeight.w500, + borderRadius: 12.r, + // padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + height: 56.h, + ), + SizedBox(height: 8.h), + CustomButton( + text: LocaleKeys.noThanksIKnowTheClinic.tr(context: context), + onPressed: () { + context.pop(); + }, + backgroundColor: AppColors.chipSecondaryLightRedColor, + borderColor: AppColors.chipSecondaryLightRedColor, + textColor: AppColors.primaryRedColor, + fontSize: 16.f, + fontWeight: FontWeight.w500, + borderRadius: 12.r, + // padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + height: 56.h, + ), + ], + ).paddingSymmetrical(24.w, 20.h), + callBackFunc: () {}, + ); + } }