From 72d765e50808e39c64befb9074f6dde3646d3754 Mon Sep 17 00:00:00 2001 From: faizatflutter Date: Mon, 13 Oct 2025 15:46:02 +0300 Subject: [PATCH] Design Updates --- .../appointment_details_page.dart | 55 +++++++++++++------ .../appointments/my_appointments_page.dart | 1 - lib/presentation/authentication/login.dart | 4 +- lib/presentation/authentication/register.dart | 1 - .../insurance_update_details_card.dart | 9 ++- .../medical_file/medical_file_page.dart | 2 +- lib/presentation/my_family/my_family.dart | 5 +- .../profile_settings/profile_settings.dart | 2 +- lib/widgets/buttons/custom_button.dart | 9 ++- pubspec.yaml | 1 - 10 files changed, 51 insertions(+), 38 deletions(-) diff --git a/lib/presentation/appointments/appointment_details_page.dart b/lib/presentation/appointments/appointment_details_page.dart index fe93ec3..f5b5b7e 100644 --- a/lib/presentation/appointments/appointment_details_page.dart +++ b/lib/presentation/appointments/appointment_details_page.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_staggered_animations/flutter_staggered_animations.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart'; @@ -22,16 +21,15 @@ import 'package:hmg_patient_app_new/presentation/appointments/appointment_paymen 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/book_appointment/widgets/appointment_calendar.dart'; -import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_detail_page.dart'; import 'package:hmg_patient_app_new/presentation/prescriptions/prescriptions_list_page.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'; 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:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart'; -import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart'; import 'package:maps_launcher/maps_launcher.dart'; import 'package:provider/provider.dart'; @@ -170,15 +168,19 @@ class _AppointmentDetailsPageState extends State { child: CustomButton( text: "Get Directions".needTranslation, onPressed: () { - MapsLauncher.launchCoordinates(double.parse(widget.patientAppointmentHistoryResponseModel.latitude!), - double.parse(widget.patientAppointmentHistoryResponseModel.longitude!), widget.patientAppointmentHistoryResponseModel.projectName); + MapsLauncher.launchCoordinates( + double.parse(widget.patientAppointmentHistoryResponseModel.latitude!), + double.parse(widget.patientAppointmentHistoryResponseModel.longitude!), + widget.patientAppointmentHistoryResponseModel.projectName); }, backgroundColor: AppColors.textColor.withOpacity(0.8), - borderColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction).withOpacity(0.01), + borderColor: + AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction) + .withOpacity(0.01), textColor: AppColors.whiteColor, - fontSize: 14, + fontSize: 14.f, fontWeight: FontWeight.w500, - borderRadius: 12.h, + borderRadius: 12.r, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 40.h, icon: AppAssets.directions_icon, @@ -235,7 +237,8 @@ class _AppointmentDetailsPageState extends State { "Lab & Radiology".needTranslation.toText18(isBold: true), SizedBox(height: 16.h), GridView( - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13.h, mainAxisSpacing: 13.h, childAspectRatio: 7 / 6), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, crossAxisSpacing: 13.h, mainAxisSpacing: 13.h, childAspectRatio: 7 / 6), physics: NeverScrollableScrollPhysics(), shrinkWrap: true, children: [ @@ -296,13 +299,17 @@ class _AppointmentDetailsPageState extends State { children: [ Column( children: [ - SizedBox(width: 150.h, child: prescriptionVM.prescriptionDetailsList[index].itemDescription!.toText12(isBold: true, maxLine: 1)), + SizedBox( + width: 150.h, + child: prescriptionVM.prescriptionDetailsList[index].itemDescription! + .toText12(isBold: true, maxLine: 1)), SizedBox( width: 150.h, child: "Prescribed By: ${widget.patientAppointmentHistoryResponseModel.doctorTitle} ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}" .needTranslation - .toText10(weight: FontWeight.w500, color: AppColors.greyTextColor, letterSpacing: -0.4), + .toText10( + weight: FontWeight.w500, color: AppColors.greyTextColor, letterSpacing: -0.4), ), ], ), @@ -415,7 +422,8 @@ class _AppointmentDetailsPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ "Amount before tax".needTranslation.toText18(isBold: true), - Utils.getPaymentAmountWithSymbol(widget.patientAppointmentHistoryResponseModel.patientShare!.toString().toText16(isBold: true), AppColors.blackColor, 13, + Utils.getPaymentAmountWithSymbol( + widget.patientAppointmentHistoryResponseModel.patientShare!.toString().toText16(isBold: true), AppColors.blackColor, 13, isSaudiCurrency: true), ], ), @@ -423,8 +431,12 @@ class _AppointmentDetailsPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Expanded(child: LocaleKeys.upcomingPaymentNow.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor)), - "VAT 15%(${widget.patientAppointmentHistoryResponseModel.patientTaxAmount})".needTranslation.toText14(isBold: true, color: AppColors.greyTextColor, letterSpacing: -2), + Expanded( + child: + LocaleKeys.upcomingPaymentNow.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor)), + "VAT 15%(${widget.patientAppointmentHistoryResponseModel.patientTaxAmount})" + .needTranslation + .toText14(isBold: true, color: AppColors.greyTextColor, letterSpacing: -2), ], ), SizedBox(height: 18.h), @@ -438,7 +450,10 @@ class _AppointmentDetailsPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Utils.getPaymentAmountWithSymbol(widget.patientAppointmentHistoryResponseModel.patientShareWithTax!.toString().toText24(isBold: true), AppColors.blackColor, 17, + Utils.getPaymentAmountWithSymbol( + widget.patientAppointmentHistoryResponseModel.patientShareWithTax!.toString().toText24(isBold: true), + AppColors.blackColor, + 17, isSaudiCurrency: true), ], ), @@ -543,9 +558,15 @@ class _AppointmentDetailsPageState extends State { LoaderBottomSheet.hideLoader(); myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); myAppointmentsViewModel.getPatientAppointments(true, false); - showCommonBottomSheet(context, child: Utils.getSuccessWidget(loadingText: "Appointment Confirmed Successfully".needTranslation), callBackFunc: (str) { + showCommonBottomSheet(context, child: Utils.getSuccessWidget(loadingText: "Appointment Confirmed Successfully".needTranslation), + callBackFunc: (str) { Navigator.of(context).pop(); - }, title: "", height: ResponsiveExtension.screenHeight * 0.3, isCloseButtonVisible: true, isDismissible: false, isFullScreen: false, + }, + title: "", + height: ResponsiveExtension.screenHeight * 0.3, + isCloseButtonVisible: true, + isDismissible: false, + isFullScreen: false, isSuccessDialog: true); }); // LoaderBottomSheet.hideLoader(); diff --git a/lib/presentation/appointments/my_appointments_page.dart b/lib/presentation/appointments/my_appointments_page.dart index 1305ea0..8d9adec 100644 --- a/lib/presentation/appointments/my_appointments_page.dart +++ b/lib/presentation/appointments/my_appointments_page.dart @@ -188,7 +188,6 @@ class _MyAppointmentsPageState extends State { Widget getAppointmentFilters(MyAppointmentsViewModel myAppointmentsVM) { return SizedBox( - height: 56.h, child: Row( children: [ Expanded( diff --git a/lib/presentation/authentication/login.dart b/lib/presentation/authentication/login.dart index 6066c18..7e5f4a1 100644 --- a/lib/presentation/authentication/login.dart +++ b/lib/presentation/authentication/login.dart @@ -92,7 +92,7 @@ class LoginScreenState extends State { ), SizedBox(height: 16.h), // Adjusted to sizer unit (approx 16px) CustomButton( - height: 56.h, + height: 50.h, text: LocaleKeys.login.tr(), icon: AppAssets.login1, iconColor: Colors.white, @@ -177,7 +177,6 @@ class LoginScreenState extends State { Padding( padding: EdgeInsets.only(bottom: 10.h), child: CustomButton( - height: 56.h, text: LocaleKeys.sendOTPSMS.tr(), onPressed: () async { if (ValidationUtils.isValidatePhone( @@ -209,7 +208,6 @@ class LoginScreenState extends State { Padding( padding: EdgeInsets.only(bottom: 10.h, top: 10.h), child: CustomButton( - height: 56.h, text: LocaleKeys.sendOTPWHATSAPP.tr(), onPressed: () async { if (ValidationUtils.isValidatePhone( diff --git a/lib/presentation/authentication/register.dart b/lib/presentation/authentication/register.dart index 7847f24..9551ba1 100644 --- a/lib/presentation/authentication/register.dart +++ b/lib/presentation/authentication/register.dart @@ -189,7 +189,6 @@ class _RegisterNew extends State { ), SizedBox(height: 25.h), CustomButton( - height: 56.h, text: LocaleKeys.registernow.tr(), icon: AppAssets.note_edit, onPressed: () { diff --git a/lib/presentation/insurance/widgets/insurance_update_details_card.dart b/lib/presentation/insurance/widgets/insurance_update_details_card.dart index 08e252b..acdf1c7 100644 --- a/lib/presentation/insurance/widgets/insurance_update_details_card.dart +++ b/lib/presentation/insurance/widgets/insurance_update_details_card.dart @@ -99,18 +99,17 @@ class PatientInsuranceCardUpdateCard extends StatelessWidget { CustomButton( icon: AppAssets.insurance_active_icon, iconColor: AppColors.whiteColor, - iconSize: 20.h, + iconSize: 20.w, text: "${LocaleKeys.updateInsurance.tr(context: context)} ${LocaleKeys.updateInsuranceSubtitle.tr(context: context)}", onPressed: () {}, backgroundColor: insuranceViewModel.patientInsuranceUpdateResponseModel != null ? AppColors.successColor : AppColors.lightGrayBGColor, borderColor: AppColors.successColor.withOpacity(0.01), textColor: AppColors.whiteColor, - fontSize: 16, + fontSize: 16.f, fontWeight: FontWeight.w500, - borderRadius: 12, + borderRadius: 12.r, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), - height: 56.h, - ).paddingSymmetrical(24.h, 0.h), + ).paddingSymmetrical(24.w, 0.h), ], ); } diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart index 33d46f3..719e667 100644 --- a/lib/presentation/medical_file/medical_file_page.dart +++ b/lib/presentation/medical_file/medical_file_page.dart @@ -377,7 +377,7 @@ class _MedicalFilePageState extends State { fontWeight: FontWeight.w500, borderRadius: 12.r, padding: EdgeInsets.fromLTRB(10.w, 0, 10.w, 0), - height: 56.h, + height: 40.h, icon: AppAssets.add_icon, iconColor: AppColors.primaryRedColor, ), diff --git a/lib/presentation/my_family/my_family.dart b/lib/presentation/my_family/my_family.dart index f9c4799..5020b82 100644 --- a/lib/presentation/my_family/my_family.dart +++ b/lib/presentation/my_family/my_family.dart @@ -73,9 +73,8 @@ class _FamilyMedicalScreenState extends State { }); }, icon: AppAssets.add_icon, - height: 56.h, - fontSize: 16, - borderRadius: 12.h, + fontSize: 16.f, + borderRadius: 12.r, fontWeight: FontWeight.w500)) : SizedBox(), child: Column( diff --git a/lib/presentation/profile_settings/profile_settings.dart b/lib/presentation/profile_settings/profile_settings.dart index c041371..59e59b1 100644 --- a/lib/presentation/profile_settings/profile_settings.dart +++ b/lib/presentation/profile_settings/profile_settings.dart @@ -404,7 +404,7 @@ class FamilyCardWidget extends StatelessWidget { borderColor: canSwitch ? AppColors.secondaryLightRedColor : AppColors.primaryRedColor, textColor: canSwitch ? AppColors.primaryRedColor : AppColors.whiteColor, iconColor: canSwitch ? AppColors.primaryRedColor : AppColors.whiteColor, - height: 56.h, + height: 56.h, fontSize: 14.f, ).paddingOnly(top: 12.h, right: 16.w, left: 16.w, bottom: 16.h); } diff --git a/lib/widgets/buttons/custom_button.dart b/lib/widgets/buttons/custom_button.dart index c35c0c3..28d6554 100644 --- a/lib/widgets/buttons/custom_button.dart +++ b/lib/widgets/buttons/custom_button.dart @@ -56,7 +56,7 @@ class CustomButton extends StatelessWidget { return GestureDetector( onTap: isDisabled ? null : onPressed, child: Container( - height: height ?? (56.h), + height: height ?? (50.h), width: width, padding: padding, decoration: RoundedRectangleBorder().toSmoothCornerDecoration( @@ -70,10 +70,9 @@ class CustomButton extends StatelessWidget { children: [ if (icon != null) Padding( - padding: text.isNotEmpty ?EdgeInsets.only(right: 8.h, left: 8.h): EdgeInsets.zero, - child: Utils.buildSvgWithAssets(icon: icon!, iconColor: iconColor, isDisabled: isDisabled, width: iconSize, height: iconSize), + padding: text.isNotEmpty ? EdgeInsets.only(right: 8.h, left: 8.h) : EdgeInsets.zero, + child: Utils.buildSvgWithAssets(icon: icon!, iconColor: iconColor, isDisabled: isDisabled, width: iconS, height: iconS), ), - Visibility( visible: text.isNotEmpty, child: Padding( @@ -82,7 +81,7 @@ class CustomButton extends StatelessWidget { text, overflow: textOverflow, style: context.dynamicTextStyle( - fontSize: fontSize.fSize, + fontSize: fontS, color: isDisabled ? textColor.withOpacity(0.5) : textColor, letterSpacing: 0, fontWeight: fontWeight, diff --git a/pubspec.yaml b/pubspec.yaml index 8265141..005642f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -67,7 +67,6 @@ dependencies: jiffy: ^6.4.3 hijri_gregorian_calendar: ^0.1.1 sms_otp_auto_verify: ^2.2.0 - web: any flutter_staggered_animations: ^1.1.1 smooth_corner: ^1.1.1