From f8be788a60c5108ae0c550652c1457132f8afb6f Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 8 Sep 2025 17:53:19 +0300 Subject: [PATCH] updates & fixes --- lib/core/api_consts.dart | 2 +- lib/features/lab/lab_repo.dart | 23 +-- lib/features/radiology/radiology_repo.dart | 18 +-- .../widgets/appointment_doctor_card.dart | 144 +++++++++--------- .../authentication/saved_login_screen.dart | 1 + lib/presentation/home/landing_page.dart | 4 +- .../home/widgets/large_service_card.dart | 2 +- lib/presentation/lab/search_lab_report.dart | 3 +- lib/widgets/buttons/custom_button.dart | 2 +- 9 files changed, 84 insertions(+), 115 deletions(-) diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index 5b6c873..480ea2d 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -726,7 +726,7 @@ const DEACTIVATE_ACCOUNT = 'Services/Patients.svc/REST/PatientAppleActivation_In 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/features/lab/lab_repo.dart b/lib/features/lab/lab_repo.dart index d746c69..ede2ec8 100644 --- a/lib/features/lab/lab_repo.dart +++ b/lib/features/lab/lab_repo.dart @@ -18,23 +18,7 @@ class LabRepoImp implements LabRepo { @override Future>>> getPatientLabOrders({required String patientId}) async { - final mapDevice = { - "isDentalAllowedBackend": false, - "VersionID": 50.0, - "Channel": 3, - "LanguageID": 2, - "IPAdress": "10.20.10.20", - "generalid": "Cs2020@2016\$2958", - "Latitude": 0.0, - "Longitude": 0.0, - "DeviceTypeID": 1, - "PatientType": 1, - "PatientTypeID": 1, - "TokenID": "@dm!n", - "PatientID": "1018977", - "PatientOutSA": "0", - "SessionID": "03478TYC02N80874CTYN04883475!?" - }; + Map mapDevice = {}; try { GenericApiModel>? apiResponse; @@ -52,10 +36,7 @@ class LabRepoImp implements LabRepo { throw Exception("lab list is empty"); } - final labOrders = list - .map((item) => PatientLabOrdersResponseModel.fromJson(item as Map)) - .toList() - .cast(); + final labOrders = list.map((item) => PatientLabOrdersResponseModel.fromJson(item as Map)).toList().cast(); apiResponse = GenericApiModel>( messageStatus: messageStatus, diff --git a/lib/features/radiology/radiology_repo.dart b/lib/features/radiology/radiology_repo.dart index 2917dfd..9db803d 100644 --- a/lib/features/radiology/radiology_repo.dart +++ b/lib/features/radiology/radiology_repo.dart @@ -18,23 +18,7 @@ class RadiologyRepoImp implements RadiologyRepo { @override Future>>> getPatientRadiologyOrders({required String patientId}) async { - final mapDevice = { - "isDentalAllowedBackend": false, - "VersionID": 50.0, - "Channel": 3, - "LanguageID": 2, - "IPAdress": "10.20.10.20", - "generalid": "Cs2020@2016\$2958", - "Latitude": 0.0, - "Longitude": 0.0, - "DeviceTypeID": 1, - "PatientType": 1, - "PatientTypeID": 1, - "TokenID": "@dm!n", - "PatientID": "1018977", - "PatientOutSA": "0", - "SessionID": "03478TYC02N80874CTYN04883475!?" - }; + Map mapDevice = {}; try { GenericApiModel>? apiResponse; diff --git a/lib/presentation/appointments/widgets/appointment_doctor_card.dart b/lib/presentation/appointments/widgets/appointment_doctor_card.dart index 65a0fe8..904d6d0 100644 --- a/lib/presentation/appointments/widgets/appointment_doctor_card.dart +++ b/lib/presentation/appointments/widgets/appointment_doctor_card.dart @@ -42,77 +42,79 @@ class AppointmentDoctorCard extends StatelessWidget { fit: BoxFit.fill, ).circle(100), SizedBox(width: 16.h), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - patientAppointmentHistoryResponseModel.doctorNameObj!.toText16(isBold: true), - SizedBox(height: 8.h), - Row( - children: [ - CustomButton( - text: patientAppointmentHistoryResponseModel.clinicName!, - onPressed: () {}, - backgroundColor: AppColors.greyColor, - borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, - fontSize: 10, - fontWeight: FontWeight.w500, - borderRadius: 8, - padding: EdgeInsets.fromLTRB(10, 0, 10, 0), - height: 30.h, - ), - SizedBox(width: 6.h), - CustomButton( - text: patientAppointmentHistoryResponseModel.projectName!, - onPressed: () {}, - backgroundColor: AppColors.greyColor, - borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, - fontSize: 10, - fontWeight: FontWeight.w500, - borderRadius: 8, - padding: EdgeInsets.fromLTRB(10, 0, 10, 0), - height: 30.h, - ), - ], - ), - SizedBox(height: 6.h), - Row( - children: [ - CustomButton( - icon: AppAssets.appointment_calendar_icon, - iconColor: AppColors.blackColor, - iconSize: 12.h, - text: DateUtil.formatDateToDate(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false), - onPressed: () {}, - backgroundColor: AppColors.greyColor, - borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, - fontSize: 10, - fontWeight: FontWeight.w500, - borderRadius: 8, - padding: EdgeInsets.fromLTRB(10, 0, 10, 0), - height: 30.h, - ), - SizedBox(width: 6.h), - CustomButton( - icon: AppAssets.appointment_time_icon, - iconColor: AppColors.blackColor, - iconSize: 12.h, - text: DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false), - onPressed: () {}, - backgroundColor: AppColors.greyColor, - borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, - fontSize: 10, - fontWeight: FontWeight.w500, - borderRadius: 8, - padding: EdgeInsets.fromLTRB(10, 0, 10, 0), - height: 30.h, - ), - ], - ) - ], + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + patientAppointmentHistoryResponseModel.doctorNameObj!.toText16(isBold: true), + SizedBox(height: 8.h), + Row( + children: [ + CustomButton( + text: patientAppointmentHistoryResponseModel.clinicName!, + onPressed: () {}, + backgroundColor: AppColors.greyColor, + borderColor: AppColors.greyColor, + textColor: AppColors.blackColor, + fontSize: 10, + fontWeight: FontWeight.w500, + borderRadius: 8, + padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + height: 30.h, + ), + SizedBox(width: 6.h), + CustomButton( + text: patientAppointmentHistoryResponseModel.projectName!, + onPressed: () {}, + backgroundColor: AppColors.greyColor, + borderColor: AppColors.greyColor, + textColor: AppColors.blackColor, + fontSize: 10, + fontWeight: FontWeight.w500, + borderRadius: 8, + padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + height: 30.h, + ), + ], + ), + SizedBox(height: 6.h), + Row( + children: [ + CustomButton( + icon: AppAssets.appointment_calendar_icon, + iconColor: AppColors.blackColor, + iconSize: 12.h, + text: DateUtil.formatDateToDate(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false), + onPressed: () {}, + backgroundColor: AppColors.greyColor, + borderColor: AppColors.greyColor, + textColor: AppColors.blackColor, + fontSize: 10, + fontWeight: FontWeight.w500, + borderRadius: 8, + padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + height: 30.h, + ), + SizedBox(width: 6.h), + CustomButton( + icon: AppAssets.appointment_time_icon, + iconColor: AppColors.blackColor, + iconSize: 12.h, + text: DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false), + onPressed: () {}, + backgroundColor: AppColors.greyColor, + borderColor: AppColors.greyColor, + textColor: AppColors.blackColor, + fontSize: 10, + fontWeight: FontWeight.w500, + borderRadius: 8, + padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + height: 30.h, + ), + ], + ) + ], + ), ), ], ), diff --git a/lib/presentation/authentication/saved_login_screen.dart b/lib/presentation/authentication/saved_login_screen.dart index 357daa6..fb5fbda 100644 --- a/lib/presentation/authentication/saved_login_screen.dart +++ b/lib/presentation/authentication/saved_login_screen.dart @@ -189,6 +189,7 @@ class _SavedLogin extends State { borderColor: AppColors.textColor, textColor: AppColors.textColor, icon: AppAssets.whatsapp, + iconColor: null, ), ), ], diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart index b33658f..d58d0c4 100644 --- a/lib/presentation/home/landing_page.dart +++ b/lib/presentation/home/landing_page.dart @@ -287,7 +287,7 @@ class _LandingPageState extends State { scrollDirection: Axis.horizontal, itemCount: LandingPageData.getServiceCardsList.length, shrinkWrap: true, - padding: const EdgeInsets.only(left: 0, right: 8), + padding: EdgeInsets.only(left: 24.h, right: 24.h), itemBuilder: (context, index) { return AnimationConfiguration.staggeredList( position: index, @@ -305,7 +305,7 @@ class _LandingPageState extends State { ), ); }, - separatorBuilder: (BuildContext cxt, int index) => 0.width, + separatorBuilder: (BuildContext cxt, int index) => 8.width, ), ), ], diff --git a/lib/presentation/home/widgets/large_service_card.dart b/lib/presentation/home/widgets/large_service_card.dart index 8318798..8473eff 100644 --- a/lib/presentation/home/widgets/large_service_card.dart +++ b/lib/presentation/home/widgets/large_service_card.dart @@ -34,7 +34,7 @@ class LargeServiceCard extends StatelessWidget { borderRadius: 16, ), child: Padding( - padding: EdgeInsets.symmetric(horizontal: 8.h), + padding: EdgeInsets.symmetric(horizontal: 0.h), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/presentation/lab/search_lab_report.dart b/lib/presentation/lab/search_lab_report.dart index d513b35..e5b52e0 100644 --- a/lib/presentation/lab/search_lab_report.dart +++ b/lib/presentation/lab/search_lab_report.dart @@ -71,8 +71,9 @@ class _SearchLabResultsContentState extends State { controller: searchEditingController, isEnable: true, prefix: null, - autoFocus: true, + autoFocus: false, isBorderAllowed: false, + keyboardType: TextInputType.text, padding: EdgeInsets.symmetric( vertical: ResponsiveExtension(10).h, horizontal: ResponsiveExtension(15).h, diff --git a/lib/widgets/buttons/custom_button.dart b/lib/widgets/buttons/custom_button.dart index 5413cea..e1448dc 100644 --- a/lib/widgets/buttons/custom_button.dart +++ b/lib/widgets/buttons/custom_button.dart @@ -18,7 +18,7 @@ class CustomButton extends StatelessWidget { final String? fontFamily; final FontWeight fontWeight; final bool isDisabled; - final Color iconColor; + final Color? iconColor; final double height; final double iconSize;