Design Updates

pull/86/head
faizatflutter 3 weeks ago
parent 21be3a2d06
commit 72d765e508

@ -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<AppointmentDetailsPage> {
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<AppointmentDetailsPage> {
"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<AppointmentDetailsPage> {
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<AppointmentDetailsPage> {
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<AppointmentDetailsPage> {
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<AppointmentDetailsPage> {
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<AppointmentDetailsPage> {
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();

@ -188,7 +188,6 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
Widget getAppointmentFilters(MyAppointmentsViewModel myAppointmentsVM) {
return SizedBox(
height: 56.h,
child: Row(
children: [
Expanded(

@ -92,7 +92,7 @@ class LoginScreenState extends State<LoginScreen> {
),
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<LoginScreen> {
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<LoginScreen> {
Padding(
padding: EdgeInsets.only(bottom: 10.h, top: 10.h),
child: CustomButton(
height: 56.h,
text: LocaleKeys.sendOTPWHATSAPP.tr(),
onPressed: () async {
if (ValidationUtils.isValidatePhone(

@ -189,7 +189,6 @@ class _RegisterNew extends State<RegisterNew> {
),
SizedBox(height: 25.h),
CustomButton(
height: 56.h,
text: LocaleKeys.registernow.tr(),
icon: AppAssets.note_edit,
onPressed: () {

@ -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),
],
);
}

@ -377,7 +377,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
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,
),

@ -73,9 +73,8 @@ class _FamilyMedicalScreenState extends State<FamilyMedicalScreen> {
});
},
icon: AppAssets.add_icon,
height: 56.h,
fontSize: 16,
borderRadius: 12.h,
fontSize: 16.f,
borderRadius: 12.r,
fontWeight: FontWeight.w500))
: SizedBox(),
child: Column(

@ -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(
@ -71,9 +71,8 @@ class CustomButton extends StatelessWidget {
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),
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,

@ -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

Loading…
Cancel
Save