From 8a6f94cc1d17a73e5c27f3bf17a6ab8d2c0233c2 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 13 Oct 2025 15:50:14 +0300 Subject: [PATCH 1/5] updates --- .../RRT/rrt_request_type_select.dart | 6 ++--- .../emergency_services_page.dart | 27 ++++++++++++------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart b/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart index 0e23d49..4d22610 100644 --- a/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart +++ b/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart @@ -12,8 +12,8 @@ class RrtRequestTypeSelect extends StatelessWidget { @override Widget build(BuildContext context) { - // return Consumer(builder: (context, emergencyServicesVM, child) { - return Column( + return Consumer(builder: (context, emergencyServicesVM, child) { + return Column( children: [ Container( padding: EdgeInsets.all(16.h), @@ -41,6 +41,6 @@ class RrtRequestTypeSelect extends StatelessWidget { SizedBox(height: 32.h), ], ); - // }); + }); } } diff --git a/lib/presentation/emergency_services/emergency_services_page.dart b/lib/presentation/emergency_services/emergency_services_page.dart index adf141a..02b3498 100644 --- a/lib/presentation/emergency_services/emergency_services_page.dart +++ b/lib/presentation/emergency_services/emergency_services_page.dart @@ -15,6 +15,7 @@ import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.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'; import 'package:lottie/lottie.dart'; import 'package:provider/provider.dart'; @@ -153,16 +154,22 @@ class EmergencyServicesPage extends StatelessWidget { text: LocaleKeys.confirm.tr(context: context), onPressed: () async { Navigator.of(context).pop(); - showCommonBottomSheetWithoutHeight( - title: "Rapid Response Team (RRT)".needTranslation, - context, - child: RrtRequestTypeSelect(), - isFullScreen: false, - isCloseButtonVisible: true, - hasBottomPadding: false, - backgroundColor: AppColors.bottomSheetBgColor, - callBackFunc: () {}, - ); + + LoaderBottomSheet.showLoader(); + await emergencyServicesViewModel.getRRTProcedures(onSuccess: (val) { + LoaderBottomSheet.hideLoader(); + showCommonBottomSheetWithoutHeight( + title: "Rapid Response Team (RRT)".needTranslation, + context, + child: RrtRequestTypeSelect(), + isFullScreen: false, + isCloseButtonVisible: true, + hasBottomPadding: false, + backgroundColor: AppColors.bottomSheetBgColor, + callBackFunc: () {}, + ); + }); + }, backgroundColor: AppColors.whiteColor, borderColor: AppColors.whiteColor, -- 2.30.2 From 65220270c26cd17114609226860f29edfe1e102c Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 13 Oct 2025 17:33:50 +0300 Subject: [PATCH 2/5] Size utils & fixes --- lib/core/utils/size_utils.dart | 26 ++++++++++++++----- .../appointment_payment_page.dart | 2 +- .../hospital_list_items.dart | 2 +- .../region_bottomsheet/region_list_item.dart | 2 +- .../book_appointment_page.dart | 5 ++-- .../doctor_filter/doctors_filter.dart | 4 +-- .../search_doctor_by_name.dart | 4 +-- .../select_livecare_clinic_page.dart | 13 +++------- .../widgets/appointment_calendar.dart | 8 +++--- .../book_appointment/widgets/doctor_card.dart | 6 ++--- .../home/widgets/large_service_card.dart | 4 +-- lib/widgets/custom_tab_bar.dart | 4 +-- lib/widgets/input_widget.dart | 2 +- 13 files changed, 45 insertions(+), 37 deletions(-) diff --git a/lib/core/utils/size_utils.dart b/lib/core/utils/size_utils.dart index dbe6f2f..0673807 100644 --- a/lib/core/utils/size_utils.dart +++ b/lib/core/utils/size_utils.dart @@ -1,6 +1,8 @@ import 'dart:developer'; -import 'package:flutter/material.dart'; // These are the Viewport values of your Figma Design. +import 'package:device_info_plus/device_info_plus.dart'; +import 'package:flutter/material.dart'; +import 'package:sizer/sizer.dart'; // These are the Viewport values of your Figma Design. // These are used in the code as a reference to create your UI Responsively. const num figmaDesignWidth = 375; // iPhone X / 12 base width @@ -18,12 +20,23 @@ extension ResponsiveExtension on num { double get h => (this * _screenHeight) / figmaDesignHeight; //radius - double get r => (this * _screenWidth) / figmaDesignWidth; + // double get r => (this * _screenWidth) / figmaDesignWidth; + + double get r { + return isTablet ? ((this * _screenWidth) / figmaDesignWidth) * 0.7 : (this * _screenWidth) / figmaDesignWidth; + } /// Scale text size + // double get f { + // double scale = _screenWidth / figmaDesignWidth; + // if (scale > 1.6) scale = 1.6; // optional clamp for tablets + // return this * scale; + // } double get f { - double scale = _screenWidth / figmaDesignWidth; - if (scale > 1.6) scale = 1.6; // optional clamp for tablets + double aspectRatio = _screenWidth / _screenHeight; + double scale = (_screenWidth < _screenHeight ? _screenWidth : _screenHeight) / figmaDesignWidth; + double clamp = (aspectRatio > 1.3 || aspectRatio < 0.77) ? 1.6 : 1.2; + if (scale > clamp) scale = clamp; return this * scale; } @@ -129,8 +142,9 @@ class SizeUtils { deviceType = DeviceType.mobile; } - log("longerSide: $longerSide"); - log("isTablet: $isTablet"); + print("longerSide: $longerSide"); + print("shorterSide: $shorterSide"); + print("isTablet: $isTablet"); } } diff --git a/lib/presentation/appointments/appointment_payment_page.dart b/lib/presentation/appointments/appointment_payment_page.dart index 467a480..58e5ef5 100644 --- a/lib/presentation/appointments/appointment_payment_page.dart +++ b/lib/presentation/appointments/appointment_payment_page.dart @@ -256,7 +256,7 @@ class _AppointmentPaymentPageState extends State { backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.secondaryLightRedBorderColor, textColor: AppColors.whiteColor, - fontSize: 10, + fontSize: 10.f, fontWeight: FontWeight.w500, borderRadius: 8, padding: EdgeInsets.fromLTRB(15, 0, 15, 0), diff --git a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart index 31dc74e..6d3307f 100644 --- a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart +++ b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart @@ -101,7 +101,7 @@ class HospitalListItem extends StatelessWidget { child: AppCustomChipWidget( labelText: "Location turned off".needTranslation, deleteIcon: AppAssets.location_unavailable, - deleteIconSize: Size(9, 12), + deleteIconSize: Size(9.w, 12.h), textColor: AppColors.blackColor, )), ], diff --git a/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart b/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart index 8b35921..754db53 100644 --- a/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart +++ b/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart @@ -61,7 +61,7 @@ class RegionListItem extends StatelessWidget { Widget placesCountItem(String svgPath, String count, String title) { return AppCustomChipWidget( - iconSize: 14, + iconSize: 14.h, icon: svgPath, iconHasColor: false, richText: RichText( diff --git a/lib/presentation/book_appointment/book_appointment_page.dart b/lib/presentation/book_appointment/book_appointment_page.dart index b39c51e..d1319a6 100644 --- a/lib/presentation/book_appointment/book_appointment_page.dart +++ b/lib/presentation/book_appointment/book_appointment_page.dart @@ -69,7 +69,6 @@ class _BookAppointmentPageState extends State { backgroundColor: AppColors.bgScaffoldColor, body: CollapsingListView( title: LocaleKeys.bookAppo.tr(context: context), - isLeading: Navigator.of(context).canPop(), child: SingleChildScrollView( child: Consumer(builder: (context, bookAppointmentsVM, child) { return Column( @@ -458,9 +457,9 @@ class _BookAppointmentPageState extends State { backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor, textColor: AppColors.whiteColor, - fontSize: 16, + fontSize: 16.f, fontWeight: FontWeight.w500, - borderRadius: 12, + borderRadius: 12.r, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 50.h, icon: AppAssets.login1, diff --git a/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart b/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart index 2785449..6e51f8a 100644 --- a/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart +++ b/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart @@ -180,10 +180,10 @@ class DoctorsFilters extends StatelessWidget{ backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor, textColor: Colors.white, - fontSize: 16, + fontSize: 16.f, padding: EdgeInsets.zero, fontWeight: FontWeight.w500, - borderRadius: 12, + borderRadius: 10.r, icon: AppAssets.add_icon, iconColor: AppColors.primaryRedColor, ).paddingAll(24.h), diff --git a/lib/presentation/book_appointment/search_doctor_by_name.dart b/lib/presentation/book_appointment/search_doctor_by_name.dart index 5949ef5..fabea2d 100644 --- a/lib/presentation/book_appointment/search_doctor_by_name.dart +++ b/lib/presentation/book_appointment/search_doctor_by_name.dart @@ -250,9 +250,9 @@ class _SearchDoctorByNameState extends State { backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor, textColor: AppColors.whiteColor, - fontSize: 16, + fontSize: 16.f, fontWeight: FontWeight.w500, - borderRadius: 12, + borderRadius: 10.r, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 50.h, icon: AppAssets.search_icon, diff --git a/lib/presentation/book_appointment/select_livecare_clinic_page.dart b/lib/presentation/book_appointment/select_livecare_clinic_page.dart index 12a99bc..719452d 100644 --- a/lib/presentation/book_appointment/select_livecare_clinic_page.dart +++ b/lib/presentation/book_appointment/select_livecare_clinic_page.dart @@ -107,9 +107,9 @@ class SelectLivecareClinicPage extends StatelessWidget { backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor, textColor: AppColors.whiteColor, - fontSize: 16, + fontSize: 16.f, fontWeight: FontWeight.w500, - borderRadius: 12, + borderRadius: 10.r, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 50.h, icon: AppAssets.livecare_book_icon, @@ -122,18 +122,13 @@ class SelectLivecareClinicPage extends StatelessWidget { onPressed: () { Navigator.of(context).pop(); onNegativeClicked?.call(); - // Navigator.of(context).push( - // CustomPageRoute( - // page: SelectDoctorPage(), - // ), - // ); }, backgroundColor: AppColors.secondaryLightRedColor, borderColor: AppColors.secondaryLightRedColor, textColor: AppColors.primaryRedColor, - fontSize: 16, + fontSize: 16.f, fontWeight: FontWeight.w500, - borderRadius: 12, + borderRadius: 10.r, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 50.h, ).paddingSymmetrical(24.h, 0.h), diff --git a/lib/presentation/book_appointment/widgets/appointment_calendar.dart b/lib/presentation/book_appointment/widgets/appointment_calendar.dart index ff966c2..d695ea6 100644 --- a/lib/presentation/book_appointment/widgets/appointment_calendar.dart +++ b/lib/presentation/book_appointment/widgets/appointment_calendar.dart @@ -111,7 +111,7 @@ class _AppointmentCalendarState extends State { selectionDecoration: ShapeDecoration( color: AppColors.transparent, shape: SmoothRectangleBorder( - borderRadius: BorderRadius.circular(12 ?? 0), + borderRadius: BorderRadius.circular(10.r), smoothness: 1, side: BorderSide(color: AppColors.primaryRedColor, width: 1.5), ), @@ -246,10 +246,10 @@ class _AppointmentCalendarState extends State { backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor, textColor: AppColors.whiteColor, - fontSize: 16, + fontSize: 16.f, fontWeight: FontWeight.w500, - borderRadius: 12, - padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + borderRadius: 10.r, + padding: EdgeInsets.symmetric(horizontal: 10.w), height: 50.h, ), ], diff --git a/lib/presentation/book_appointment/widgets/doctor_card.dart b/lib/presentation/book_appointment/widgets/doctor_card.dart index 3f3d51c..dd9d6df 100644 --- a/lib/presentation/book_appointment/widgets/doctor_card.dart +++ b/lib/presentation/book_appointment/widgets/doctor_card.dart @@ -159,10 +159,10 @@ class DoctorCard extends StatelessWidget { backgroundColor: Color(0xffFEE9EA), borderColor: Color(0xffFEE9EA), textColor: Color(0xffED1C2B), - fontSize: 14, + fontSize: 14.f, fontWeight: FontWeight.w500, - borderRadius: 12, - padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + borderRadius: 10.r, + padding: EdgeInsets.fromLTRB(10.h, 0, 10.h, 0), height: 40.h, icon: AppAssets.add_icon, iconColor: AppColors.primaryRedColor, diff --git a/lib/presentation/home/widgets/large_service_card.dart b/lib/presentation/home/widgets/large_service_card.dart index 8473eff..5381818 100644 --- a/lib/presentation/home/widgets/large_service_card.dart +++ b/lib/presentation/home/widgets/large_service_card.dart @@ -61,9 +61,9 @@ class LargeServiceCard extends StatelessWidget { backgroundColor: AppColors.borderOnlyColor, borderColor: AppColors.borderOnlyColor, textColor: AppColors.whiteColor, - fontSize: 14, + fontSize: 14.f, fontWeight: FontWeight.bold, - borderRadius: 12, + borderRadius: 10.r, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 40.h, ), diff --git a/lib/widgets/custom_tab_bar.dart b/lib/widgets/custom_tab_bar.dart index a148cc7..743092a 100644 --- a/lib/widgets/custom_tab_bar.dart +++ b/lib/widgets/custom_tab_bar.dart @@ -79,7 +79,7 @@ class CustomTabBarState extends State { padding: EdgeInsets.all(4.w), decoration: RoundedRectangleBorder().toSmoothCornerDecoration( color: AppColors.whiteColor, - borderRadius: 12.r, + borderRadius: 10.r, ), child: Center(child: parentWidget)); } @@ -92,7 +92,7 @@ class CustomTabBarState extends State { alignment: Alignment.center, decoration: RoundedRectangleBorder().toSmoothCornerDecoration( color: isSelected ? widget.activeBackgroundColor : widget.inActiveBackgroundColor, - borderRadius: 12.r, + borderRadius: 10.r, ), child: Row( mainAxisSize: MainAxisSize.min, diff --git a/lib/widgets/input_widget.dart b/lib/widgets/input_widget.dart index 2dcd32f..aeeb543 100644 --- a/lib/widgets/input_widget.dart +++ b/lib/widgets/input_widget.dart @@ -113,7 +113,7 @@ class TextInputWidget extends StatelessWidget { children: [ Container( padding: padding, - height: 58.h, + height: 63.h, alignment: Alignment.center, decoration: RoundedRectangleBorder().toSmoothCornerDecoration( color: Colors.white, -- 2.30.2 From 2160f87c59f84eccdcc8e0422640c7c2e185f060 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 2 Nov 2025 14:52:29 +0300 Subject: [PATCH 3/5] updates --- lib/core/api_consts.dart | 2 +- .../call_ambulance/tracking_screen.dart | 75 +++--- .../medical_file/medical_file_page.dart | 244 +++++++++--------- .../my_family/widget/family_cards.dart | 2 +- 4 files changed, 160 insertions(+), 163 deletions(-) diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index ed2bba1..304b633 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -729,7 +729,7 @@ var GET_PRESCRIPTION_INSTRUCTIONS_PDF = 'Services/ChatBot_Service.svc/REST/Chatb class ApiConsts { static const maxSmallScreen = 660; - static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; + static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat; // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT diff --git a/lib/presentation/emergency_services/call_ambulance/tracking_screen.dart b/lib/presentation/emergency_services/call_ambulance/tracking_screen.dart index 8b768b4..9a9b6e5 100644 --- a/lib/presentation/emergency_services/call_ambulance/tracking_screen.dart +++ b/lib/presentation/emergency_services/call_ambulance/tracking_screen.dart @@ -7,7 +7,6 @@ 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/emergency_services/emergency_services_view_model.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/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; @@ -122,7 +121,7 @@ class TrackingScreen extends StatelessWidget { height: 40.h, backgroundColor: AppColors.lightRedButtonColor, borderColor: Colors.transparent, - text: "Share Your Live Locatin on Whatsapp".needTranslation, + text: "Share Your Live Location on Whatsapp".needTranslation, fontSize: 12.f, textColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor, @@ -231,50 +230,50 @@ class TrackingScreen extends StatelessWidget { style: TextStyle( fontSize: 21.f, fontWeight: FontWeight.w600, - color: AppColors.textColor, - ), - ), - TextSpan( - text: "...".needTranslation, - style: TextStyle( + color: AppColors.textColor, + ), + ), + TextSpan( + text: "...".needTranslation, + style: TextStyle( fontSize: 21.f, fontWeight: FontWeight.w600, - color: AppColors.errorColor, - ), - ), - ]), - ); - case OrderTrackingState.returning: - return RichText( - text: TextSpan(children: [ - TextSpan( - text: "15:30".needTranslation, - style: TextStyle( + color: AppColors.errorColor, + ), + ), + ]), + ); + case OrderTrackingState.returning: + return RichText( + text: TextSpan(children: [ + TextSpan( + text: "15:30".needTranslation, + style: TextStyle( fontSize: 21.f, fontWeight: FontWeight.w600, - color: AppColors.textColor, - ), - ), - TextSpan( - text: " mins ".needTranslation, - style: TextStyle( + color: AppColors.textColor, + ), + ), + TextSpan( + text: " mins ".needTranslation, + style: TextStyle( fontSize: 21.f, fontWeight: FontWeight.w600, - color: AppColors.errorColor, - ), - ), - TextSpan( - text: "to hospital".needTranslation, - style: TextStyle( + color: AppColors.errorColor, + ), + ), + TextSpan( + text: "to hospital".needTranslation, + style: TextStyle( fontSize: 21.f, fontWeight: FontWeight.w600, - color: AppColors.textColor, - ), - ), - ]), - ); - case OrderTrackingState.ended: - default: + color: AppColors.textColor, + ), + ), + ]), + ); + case OrderTrackingState.ended: + default: return "Arrived".needTranslation.toText21(color: AppColors.textColor, weight: FontWeight.w600); } } diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart index 07bd7f3..01fde0a 100644 --- a/lib/presentation/medical_file/medical_file_page.dart +++ b/lib/presentation/medical_file/medical_file_page.dart @@ -136,7 +136,7 @@ class _MedicalFilePageState extends State { ).withHorizontalPadding(24.w).onPress(() { DialogService dialogService = getIt.get(); dialogService.showFamilyBottomSheetWithoutH( - label: "Who do you want to book for?".needTranslation, + label: "Family Files".needTranslation, message: "This clinic or doctor is only available for the below eligible profiles.".needTranslation, onSwitchPress: (FamilyFileResponseModelLists profile) { medicalFileViewModel.switchFamilyFiles(responseID: profile.responseId, patientID: profile.patientId, phoneNumber: profile.mobileNumber); @@ -144,133 +144,130 @@ class _MedicalFilePageState extends State { profiles: medicalFileViewModel.patientFamilyFiles); }), isLeading: false, - child: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox(height: 16.h), - TextInputWidget( - labelText: LocaleKeys.search.tr(context: context), - hintText: "Type any record".needTranslation, - controller: TextEditingController(), - keyboardType: TextInputType.number, - isEnable: true, - prefix: null, - autoFocus: false, - isBorderAllowed: false, - isAllowLeadingIcon: true, - padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h), - leadingIcon: AppAssets.student_card, - ).paddingSymmetrical(24.w, 0.0), - SizedBox(height: 16.h), - Container( - width: double.infinity, - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r), - child: Padding( - padding: EdgeInsets.all(16.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset(appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.male_img : AppAssets.femaleImg, width: 56.w, height: 56.h), - SizedBox(width: 8.w), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" - .toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1), - SizedBox(height: 4.h), - Wrap( - direction: Axis.horizontal, - spacing: 4.w, - runSpacing: 6.w, - children: [ - AppCustomChipWidget( - icon: AppAssets.file_icon, - labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}", - labelPadding: EdgeInsetsDirectional.only(end: 6.w), - onChipTap: () { - navigationService.pushPage( - page: FamilyMedicalScreen( - profiles: medicalFileViewModel.patientFamilyFiles, - onSelect: (FamilyFileResponseModelLists p1) {}, - )); - }, - ), - AppCustomChipWidget( - icon: AppAssets.checkmark_icon, - labelText: LocaleKeys.verified.tr(context: context), - iconColor: AppColors.successColor, - labelPadding: EdgeInsetsDirectional.only(end: 6.w), - ), - ], - ), - ], - ) - ], - ), - SizedBox(height: 16.h), - Divider(color: AppColors.dividerColor, height: 1.h), - SizedBox(height: 16.h), - Wrap( - direction: Axis.horizontal, - spacing: 4.h, - runSpacing: 4.h, - children: [ - AppCustomChipWidget( - labelText: "${appState.getAuthenticatedUser()!.age} Years Old", + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 16.h), + TextInputWidget( + labelText: LocaleKeys.search.tr(context: context), + hintText: "Type any record".needTranslation, + controller: TextEditingController(), + keyboardType: TextInputType.number, + isEnable: true, + prefix: null, + autoFocus: false, + isBorderAllowed: false, + isAllowLeadingIcon: true, + padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h), + leadingIcon: AppAssets.student_card, + ).paddingSymmetrical(24.w, 0.0), + SizedBox(height: 16.h), + Container( + width: double.infinity, + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r), + child: Padding( + padding: EdgeInsets.all(16.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset(appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.male_img : AppAssets.femaleImg, width: 56.w, height: 56.h), + SizedBox(width: 8.w), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" + .toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1), + SizedBox(height: 4.h), + Wrap( + direction: Axis.horizontal, + spacing: 4.w, + runSpacing: 6.w, + children: [ + AppCustomChipWidget( + icon: AppAssets.file_icon, + labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}", + labelPadding: EdgeInsetsDirectional.only(end: 6.w), + onChipTap: () { + navigationService.pushPage( + page: FamilyMedicalScreen( + profiles: medicalFileViewModel.patientFamilyFiles, + onSelect: (FamilyFileResponseModelLists p1) {}, + )); + }, + ), + AppCustomChipWidget( + icon: AppAssets.checkmark_icon, + labelText: LocaleKeys.verified.tr(context: context), + iconColor: AppColors.successColor, + labelPadding: EdgeInsetsDirectional.only(end: 6.w), + ), + ], + ), + ], + ) + ], + ), + SizedBox(height: 16.h), + Divider(color: AppColors.dividerColor, height: 1.h), + SizedBox(height: 16.h), + Wrap( + direction: Axis.horizontal, + spacing: 4.h, + runSpacing: 4.h, + children: [ + AppCustomChipWidget( + labelText: "${appState.getAuthenticatedUser()!.age} Years Old", labelPadding: EdgeInsetsDirectional.only(start: 8.w, end: 8.w), - ), - AppCustomChipWidget( - icon: AppAssets.blood_icon, + ), + AppCustomChipWidget( + icon: AppAssets.blood_icon, labelText: "Blood: ${appState.getUserBloodGroup.isEmpty ? "N/A" : appState.getUserBloodGroup.isEmpty}", - iconColor: AppColors.primaryRedColor, + iconColor: AppColors.primaryRedColor, labelPadding: EdgeInsetsDirectional.only(end: 8.w), - ), - Consumer(builder: (context, insuranceVM, child) { - return AppCustomChipWidget( - icon: insuranceVM.isInsuranceExpired ? AppAssets.cancel_circle_icon : AppAssets.insurance_active_icon, - labelText: insuranceVM.isInsuranceExpired ? "Insurance Expired".needTranslation : "Insurance Active".needTranslation, - iconColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor, - textColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor, - iconSize: 12.w, - backgroundColor: - insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor.withOpacity(0.1) : AppColors.successColor.withOpacity(0.1), - labelPadding: EdgeInsetsDirectional.only(end: 8.w), - ); - }), - ], - ), - ], - ), - ), - ).paddingSymmetrical(24.w, 0.0), - SizedBox(height: 16.h), - Consumer(builder: (context, medicalFileVM, child) { - return Column( - children: [ - CustomTabBar( - activeTextColor: AppColors.primaryRedColor, - activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1), - tabs: [ - CustomTabBarModel(AppAssets.myFilesBottom, LocaleKeys.general.tr(context: context).needTranslation), - CustomTabBarModel(AppAssets.insurance, LocaleKeys.insurance.tr(context: context)), - CustomTabBarModel(AppAssets.requests, LocaleKeys.request.tr(context: context).needTranslation), - CustomTabBarModel(AppAssets.more, "More".needTranslation), + ), + Consumer(builder: (context, insuranceVM, child) { + return AppCustomChipWidget( + icon: insuranceVM.isInsuranceExpired ? AppAssets.cancel_circle_icon : AppAssets.insurance_active_icon, + labelText: insuranceVM.isInsuranceExpired ? "Insurance Expired".needTranslation : "Insurance Active".needTranslation, + iconColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor, + textColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor, + iconSize: 12.w, + backgroundColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor.withOpacity(0.1) : AppColors.successColor.withOpacity(0.1), + labelPadding: EdgeInsetsDirectional.only(end: 8.w), + ); + }), ], - onTabChange: (index) { - medicalFileVM.onTabChanged(index); - }, - ).paddingSymmetrical(24.w, 0.0), - SizedBox(height: 24.h), - getSelectedTabData(medicalFileVM.selectedTabIndex), + ), ], - ); - }), - ], - ), + ), + ), + ).paddingSymmetrical(24.w, 0.0), + SizedBox(height: 16.h), + Consumer(builder: (context, medicalFileVM, child) { + return Column( + children: [ + CustomTabBar( + activeTextColor: AppColors.primaryRedColor, + activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1), + tabs: [ + CustomTabBarModel(AppAssets.myFilesBottom, LocaleKeys.general.tr(context: context).needTranslation), + CustomTabBarModel(AppAssets.insurance, LocaleKeys.insurance.tr(context: context)), + CustomTabBarModel(AppAssets.requests, LocaleKeys.request.tr(context: context).needTranslation), + CustomTabBarModel(AppAssets.more, "More".needTranslation), + ], + onTabChange: (index) { + medicalFileVM.onTabChanged(index); + }, + ).paddingSymmetrical(24.w, 0.0), + SizedBox(height: 24.h), + getSelectedTabData(medicalFileVM.selectedTabIndex), + ], + ); + }), + ], ), ); } @@ -344,6 +341,7 @@ class _MedicalFilePageState extends State { SizedBox(height: 16.h), Consumer(builder: (context, myAppointmentsVM, child) { return SizedBox( + height: 185.h, child: myAppointmentsVM.isMyAppointmentsLoading ? MedicalFileAppointmentCard( patientAppointmentHistoryResponseModel: PatientAppointmentHistoryResponseModel(), diff --git a/lib/presentation/my_family/widget/family_cards.dart b/lib/presentation/my_family/widget/family_cards.dart index 9b1fb4b..ac71634 100644 --- a/lib/presentation/my_family/widget/family_cards.dart +++ b/lib/presentation/my_family/widget/family_cards.dart @@ -168,7 +168,7 @@ class _FamilyCardsState extends State { ? ((profile.age ?? 0) < 7 ? AppAssets.babyBoyImg : AppAssets.male_img) : (profile.age! < 7 ? AppAssets.babyGirlImg : AppAssets.femaleImg), width: 80.h, - height: 78.h), + height: 72.h), SizedBox(height: 8.h), (profile.patientName ?? "Unknown").toText14(isBold: false, isCenter: true, maxlines: 1, weight: FontWeight.w600), SizedBox(height: 8.h), -- 2.30.2 From 8dcc8dfbe359422fa0a8ae98be62176a4d3d53e2 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 4 Nov 2025 09:04:01 +0300 Subject: [PATCH 4/5] updates --- .../emergency_services/emergency_services_repo.dart | 2 +- .../appointments/my_appointments_page.dart | 6 ++++-- lib/presentation/home/landing_page.dart | 2 +- lib/presentation/medical_file/medical_file_page.dart | 12 ++++++------ lib/presentation/my_family/widget/family_cards.dart | 6 +++--- lib/widgets/custom_tab_bar.dart | 4 +++- 6 files changed, 18 insertions(+), 14 deletions(-) diff --git a/lib/features/emergency_services/emergency_services_repo.dart b/lib/features/emergency_services/emergency_services_repo.dart index 089e7ad..b238602 100644 --- a/lib/features/emergency_services/emergency_services_repo.dart +++ b/lib/features/emergency_services/emergency_services_repo.dart @@ -57,7 +57,7 @@ class EmergencyServicesRepoImp implements EmergencyServicesRepo { @override Future>>> getRRTProcedures() async { - Map mapDevice = {}; + Map mapDevice = {"ProjectID": 15}; try { GenericApiModel>? apiResponse; diff --git a/lib/presentation/appointments/my_appointments_page.dart b/lib/presentation/appointments/my_appointments_page.dart index 7481bf2..934aca4 100644 --- a/lib/presentation/appointments/my_appointments_page.dart +++ b/lib/presentation/appointments/my_appointments_page.dart @@ -93,7 +93,7 @@ class _MyAppointmentsPageState extends State { children: [ Visibility(visible: myAppointmentsVM.availableFilters.isNotEmpty, child: getAppointmentFilters(myAppointmentsVM)), ListView.separated( - padding: EdgeInsets.only(top: 24.h), + padding: EdgeInsets.only(top: 16.h), shrinkWrap: true, physics: NeverScrollableScrollPhysics(), itemCount: myAppointmentsVM.isMyAppointmentsLoading @@ -169,6 +169,7 @@ class _MyAppointmentsPageState extends State { Widget getAppointmentFilters(MyAppointmentsViewModel myAppointmentsVM) { return SizedBox( + height: 60.h, child: Row( children: [ Expanded( @@ -177,6 +178,7 @@ class _MyAppointmentsPageState extends State { width: 8.h, ), scrollDirection: Axis.horizontal, + shrinkWrap: true, itemCount: myAppointmentsVM.availableFilters.length, itemBuilder: (_, index) => AppointmentFilters( selectedFilter: myAppointmentsVM.selectedFilter, @@ -205,6 +207,6 @@ class _MyAppointmentsPageState extends State { )), ), ], - )).paddingOnly(top: 24.h, left: 24.h, right: 24.h); + )).paddingOnly(top: 16.h, left: 24.h, right: 24.h); } } diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart index 4046023..c023bd3 100644 --- a/lib/presentation/home/landing_page.dart +++ b/lib/presentation/home/landing_page.dart @@ -461,7 +461,7 @@ class _LandingPageState extends State { ], ).paddingSymmetrical(24.h, 0.h), SizedBox( - height: 340.h, + height: 280.h, child: ListView.separated( scrollDirection: Axis.horizontal, itemCount: LandingPageData.getServiceCardsList.length, diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart index 12cfea2..f95ea82 100644 --- a/lib/presentation/medical_file/medical_file_page.dart +++ b/lib/presentation/medical_file/medical_file_page.dart @@ -343,7 +343,7 @@ class _MedicalFilePageState extends State { Consumer(builder: (context, myAppointmentsVM, child) { // Provide an explicit height so the horizontal ListView has a bounded height return SizedBox( - height: 140.h, + height: 180.h, child: myAppointmentsVM.isMyAppointmentsLoading ? MedicalFileAppointmentCard( patientAppointmentHistoryResponseModel: PatientAppointmentHistoryResponseModel(), @@ -665,7 +665,7 @@ class _MedicalFilePageState extends State { ), ).paddingSymmetrical(24.w, 0.h) : SizedBox( - height: 200.h, + height: 100.h, child: ListView.separated( scrollDirection: Axis.horizontal, itemCount: myAppointmentsVM.patientMyDoctorsList.length, @@ -728,7 +728,7 @@ class _MedicalFilePageState extends State { }, separatorBuilder: (BuildContext cxt, int index) => SizedBox(width: 8.h), ), - ); + ).paddingSymmetrical(24.w, 0); }), SizedBox(height: 24.h), "Others".needTranslation.toText18(isBold: true).paddingSymmetrical(24.w, 0.h), @@ -738,7 +738,7 @@ class _MedicalFilePageState extends State { crossAxisCount: 3, crossAxisSpacing: 16.h, mainAxisSpacing: 16.w, - mainAxisExtent: 130.h, + mainAxisExtent: 110.h, ), physics: NeverScrollableScrollPhysics(), padding: EdgeInsets.zero, @@ -844,7 +844,7 @@ class _MedicalFilePageState extends State { crossAxisCount: 3, crossAxisSpacing: 16.h, mainAxisSpacing: 16.w, - mainAxisExtent: 150.h, + mainAxisExtent: 120.h, ), physics: NeverScrollableScrollPhysics(), padding: EdgeInsets.only(top: 12.h), @@ -931,7 +931,7 @@ class _MedicalFilePageState extends State { crossAxisCount: 3, crossAxisSpacing: 16.h, mainAxisSpacing: 16.w, - mainAxisExtent: 140.h, + mainAxisExtent: 110.h, ), physics: NeverScrollableScrollPhysics(), padding: EdgeInsets.zero, diff --git a/lib/presentation/my_family/widget/family_cards.dart b/lib/presentation/my_family/widget/family_cards.dart index ac71634..90159b0 100644 --- a/lib/presentation/my_family/widget/family_cards.dart +++ b/lib/presentation/my_family/widget/family_cards.dart @@ -167,15 +167,15 @@ class _FamilyCardsState extends State { : profile.gender == 1 ? ((profile.age ?? 0) < 7 ? AppAssets.babyBoyImg : AppAssets.male_img) : (profile.age! < 7 ? AppAssets.babyGirlImg : AppAssets.femaleImg), - width: 80.h, - height: 72.h), + width: 72.h, + height: 70.h), SizedBox(height: 8.h), (profile.patientName ?? "Unknown").toText14(isBold: false, isCenter: true, maxlines: 1, weight: FontWeight.w600), SizedBox(height: 8.h), CustomChipWidget( chipType: ChipTypeEnum.alert, backgroundColor: AppColors.lightGrayBGColor, - chipText: "Relation:${profile.relationship ?? "N/A"}", + chipText: "Relation:${profile.relationship ?? " N/A"}", iconAsset: AppAssets.heart, isShowBorder: false, borderRadius: 8.h, diff --git a/lib/widgets/custom_tab_bar.dart b/lib/widgets/custom_tab_bar.dart index 344059c..35aafa4 100644 --- a/lib/widgets/custom_tab_bar.dart +++ b/lib/widgets/custom_tab_bar.dart @@ -59,10 +59,11 @@ class CustomTabBarState extends State { if (widget.tabs.length > 3) { parentWidget = ListView.separated( + shrinkWrap: true, scrollDirection: Axis.horizontal, padding: EdgeInsets.zero, physics: const BouncingScrollPhysics(), - itemBuilder: (cxt, index) => myTab(widget.tabs[index], index).expanded, + itemBuilder: (cxt, index) => myTab(widget.tabs[index], index), separatorBuilder: (cxt, index) => 4.width, itemCount: widget.tabs.length, ); @@ -75,6 +76,7 @@ class CustomTabBarState extends State { } return Container( + height: 62.h, padding: EdgeInsets.all(4.w), decoration: RoundedRectangleBorder().toSmoothCornerDecoration( color: AppColors.whiteColor, -- 2.30.2 From f280d4a28a584bcc3fbed5a982b31d639f26dcd6 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 4 Nov 2025 11:15:10 +0300 Subject: [PATCH 5/5] todo page implementation started --- lib/presentation/home/navigation_screen.dart | 3 +- lib/presentation/todo/todo_page.dart | 34 ++++++++++++-------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/lib/presentation/home/navigation_screen.dart b/lib/presentation/home/navigation_screen.dart index cd95613..9c7566d 100644 --- a/lib/presentation/home/navigation_screen.dart +++ b/lib/presentation/home/navigation_screen.dart @@ -5,6 +5,7 @@ import 'package:hmg_patient_app_new/presentation/book_appointment/book_appointme import 'package:hmg_patient_app_new/presentation/hmg_services/services_page.dart'; import 'package:hmg_patient_app_new/presentation/home/landing_page.dart'; import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart'; +import 'package:hmg_patient_app_new/presentation/todo/todo_page.dart'; import 'package:hmg_patient_app_new/widgets/bottom_navigation/bottom_navigation.dart'; class LandingNavigation extends StatefulWidget { @@ -30,7 +31,7 @@ class _LandingNavigationState extends State { const LandingPage(), appState.isAuthenticated ? MedicalFilePage() : /* need add feedback page */ const LandingPage(), BookAppointmentPage(), - const LandingPage(), + const ToDoPage(), appState.isAuthenticated ? /* need add news page */ ServicesPage() : const LandingPage(), ], ), diff --git a/lib/presentation/todo/todo_page.dart b/lib/presentation/todo/todo_page.dart index 65b762f..20f8cd4 100644 --- a/lib/presentation/todo/todo_page.dart +++ b/lib/presentation/todo/todo_page.dart @@ -1,23 +1,31 @@ import 'package:flutter/material.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/theme/colors.dart'; +import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; -class ToDoPage extends StatelessWidget { +class ToDoPage extends StatefulWidget { const ToDoPage({super.key}); + @override + State createState() => _ToDoPageState(); +} + +class _ToDoPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, - appBar: AppBar( - title: const Text('Appointments'), - backgroundColor: AppColors.bgScaffoldColor, - ), - body: const Center( - child: Text( - 'Appointments Page', - style: TextStyle(fontSize: 24), - ), - ), + return CollapsingListView( + title: "ToDo List".needTranslation, + isLeading: false, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 16.h), + "Ancillary Orders".needTranslation.toText18(isBold: true), + + ], + ).paddingSymmetrical(24.w, 0), ); } } \ No newline at end of file -- 2.30.2