pull/28/head
haroon amjad 2 months ago
parent 8df38ea6d1
commit 4269e99be9

@ -5,8 +5,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart'; import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart'; 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/string_extensions.dart';
@ -20,6 +18,7 @@ import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/appointment_payment_page.dart'; import 'package:hmg_patient_app_new/presentation/appointments/appointment_payment_page.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart'; 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/appointments/widgets/appointment_doctor_card.dart';
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_detail_page.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/presentation/prescriptions/prescriptions_list_page.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
@ -62,334 +61,333 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
prescriptionsViewModel = Provider.of<PrescriptionsViewModel>(context); prescriptionsViewModel = Provider.of<PrescriptionsViewModel>(context);
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
appBar: AppBar(
title: "Appointment Details".needTranslation.toText18(),
backgroundColor: AppColors.bgScaffoldColor,
),
body: Column( body: Column(
children: [ children: [
Expanded( Expanded(
child: SingleChildScrollView( child: CollapsingListView(
child: Column( title: "Appointment Details".needTranslation,
crossAxisAlignment: CrossAxisAlignment.start, child: SingleChildScrollView(
children: [ child: Column(
Row( crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
children: [ Row(
"Appointment Details".needTranslation.toText20(isBold: true), mainAxisAlignment: MainAxisAlignment.spaceBetween,
if (AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel)) children: [
CustomButton( "Appointment Details".needTranslation.toText20(isBold: true),
text: "Report".needTranslation, if (AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel))
onPressed: () {}, CustomButton(
backgroundColor: AppColors.secondaryLightRedColor, text: "Report".needTranslation,
borderColor: AppColors.secondaryLightRedColor, onPressed: () {},
textColor: AppColors.primaryRedColor, backgroundColor: AppColors.secondaryLightRedColor,
fontSize: 14, borderColor: AppColors.secondaryLightRedColor,
fontWeight: FontWeight.w500, textColor: AppColors.primaryRedColor,
borderRadius: 12, fontSize: 14,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), fontWeight: FontWeight.w500,
height: 40.h, borderRadius: 12,
iconSize: 16.h, padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
icon: AppAssets.report_icon, height: 40.h,
iconColor: AppColors.primaryRedColor, iconSize: 16.h,
) icon: AppAssets.report_icon,
], iconColor: AppColors.primaryRedColor,
), )
SizedBox(height: 24.h), ],
AppointmentDoctorCard( ),
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel, SizedBox(height: 24.h),
onAskDoctorTap: () {}, AppointmentDoctorCard(
onCancelTap: () async { patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
showCommonBottomSheet(context, onAskDoctorTap: () {},
child: Utils.getLoadingWidget(), onCancelTap: () async {
callBackFunc: (str) {}, showCommonBottomSheet(context,
title: "", child: Utils.getLoadingWidget(),
height: ResponsiveExtension.screenHeight * 0.3, callBackFunc: (str) {},
isCloseButtonVisible: false, title: "",
isDismissible: false, height: ResponsiveExtension.screenHeight * 0.3,
isFullScreen: false); isCloseButtonVisible: false,
await myAppointmentsViewModel.cancelAppointment( isDismissible: false,
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel, isFullScreen: false);
onSuccess: (apiResponse) { await myAppointmentsViewModel.cancelAppointment(
Navigator.of(context).pop(); patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
showCommonBottomSheet(context, onSuccess: (apiResponse) {
child: Utils.getSuccessWidget(loadingText: "Appointment Cancelled Successfully".needTranslation), Navigator.of(context).pop();
callBackFunc: (str) {}, showCommonBottomSheet(context,
title: "", child: Utils.getSuccessWidget(loadingText: "Appointment Cancelled Successfully".needTranslation),
height: ResponsiveExtension.screenHeight * 0.3, callBackFunc: (str) {},
isCloseButtonVisible: false, title: "",
isDismissible: false, height: ResponsiveExtension.screenHeight * 0.3,
isFullScreen: false, isCloseButtonVisible: false,
isSuccessDialog: true); isDismissible: false,
}); isFullScreen: false,
Navigator.of(context).pop(); isSuccessDialog: true);
Navigator.of(context).pop(); });
}, Navigator.of(context).pop();
onRescheduleTap: () {}, Navigator.of(context).pop();
), },
SizedBox(height: 16.h), onRescheduleTap: () {},
!AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel) ),
? Column( SizedBox(height: 16.h),
children: [ !AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel)
Container( ? Column(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( children: [
color: AppColors.whiteColor, Container(
borderRadius: 20.h, decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
hasShadow: false, color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
),
child: Padding(
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
"Appointment Status".needTranslation.toText16(isBold: true),
],
),
SizedBox(height: 4.h),
(!AppointmentType.isConfirmed(widget.patientAppointmentHistoryResponseModel)
? "Not Confirmed".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500)
: "Confirmed".needTranslation.toText12(color: AppColors.successColor, fontWeight: FontWeight.w500)),
SizedBox(height: 16.h),
Stack(
children: [
ClipRRect(
clipBehavior: Clip.hardEdge,
borderRadius: BorderRadius.circular(24),
child: Image.network(
"https://maps.googleapis.com/maps/api/staticmap?center=${widget.patientAppointmentHistoryResponseModel.latitude},${widget.patientAppointmentHistoryResponseModel.longitude}&zoom=14&size=350x165&maptype=roadmap&markers=color:red%7C${widget.patientAppointmentHistoryResponseModel.latitude},${widget.patientAppointmentHistoryResponseModel.longitude}&key=AIzaSyB6TERnxIr0yJ3qG4ULBZbu0sAD4tGqtng",
fit: BoxFit.contain,
),
),
Positioned(
bottom: 0,
child: SizedBox(
width: MediaQuery.of(context).size.width * 0.785,
child: CustomButton(
text: "Get Directions".needTranslation,
onPressed: () {
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),
textColor: AppColors.whiteColor,
fontSize: 14,
fontWeight: FontWeight.w500,
borderRadius: 12.h,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
icon: AppAssets.directions_icon,
iconColor: AppColors.whiteColor,
iconSize: 13.h,
).paddingAll(12.h),
),
),
],
),
],
),
),
), ),
child: Padding( SizedBox(height: 16.h),
padding: EdgeInsets.all(16.h), Container(
child: Column( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
crossAxisAlignment: CrossAxisAlignment.start, color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
),
child: Row(
mainAxisSize: MainAxisSize.max,
children: [ children: [
Row( Utils.buildSvgWithAssets(icon: AppAssets.prescription_reminder_icon, width: 35.h, height: 35.h),
SizedBox(width: 8.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"Appointment Status".needTranslation.toText16(isBold: true), LocaleKeys.setReminder.tr(context: context).toText13(isBold: true),
"Notify me before the appointment".needTranslation.toText11(color: AppColors.textColorLight, weight: FontWeight.w500),
], ],
), ),
SizedBox(height: 4.h), const Spacer(),
(!AppointmentType.isConfirmed(widget.patientAppointmentHistoryResponseModel) Switch(
? "Not Confirmed".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500) activeColor: AppColors.successColor,
: "Confirmed".needTranslation.toText12(color: AppColors.successColor, fontWeight: FontWeight.w500)), activeTrackColor: AppColors.successColor.withValues(alpha: .15),
SizedBox(height: 16.h), value: widget.patientAppointmentHistoryResponseModel.hasReminder!,
Stack( onChanged: (newValue) {
children: [ setState(() {
ClipRRect( myAppointmentsViewModel.setAppointmentReminder(newValue, widget.patientAppointmentHistoryResponseModel);
clipBehavior: Clip.hardEdge, });
borderRadius: BorderRadius.circular(24), },
child: Image.network(
"https://maps.googleapis.com/maps/api/staticmap?center=${widget.patientAppointmentHistoryResponseModel.latitude},${widget.patientAppointmentHistoryResponseModel.longitude}&zoom=14&size=350x165&maptype=roadmap&markers=color:red%7C${widget.patientAppointmentHistoryResponseModel.latitude},${widget.patientAppointmentHistoryResponseModel.longitude}&key=AIzaSyB6TERnxIr0yJ3qG4ULBZbu0sAD4tGqtng",
fit: BoxFit.contain,
),
),
Positioned(
bottom: 0,
child: SizedBox(
width: MediaQuery.of(context).size.width * 0.785,
child: CustomButton(
text: "Get Directions".needTranslation,
onPressed: () {
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),
textColor: AppColors.whiteColor,
fontSize: 14,
fontWeight: FontWeight.w500,
borderRadius: 12.h,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
icon: AppAssets.directions_icon,
iconColor: AppColors.whiteColor,
iconSize: 13.h,
).paddingAll(12.h),
),
),
],
), ),
], ],
), ).paddingSymmetrical(16.h, 16.h),
),
),
SizedBox(height: 16.h),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
), ),
child: Row( SizedBox(height: 16.h),
mainAxisSize: MainAxisSize.max, ],
)
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Lab & Radiology".needTranslation.toText18(isBold: true),
SizedBox(height: 16.h),
GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13.h, mainAxisSpacing: 13.h, childAspectRatio: 7 / 6),
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.prescription_reminder_icon, width: 35.h, height: 35.h), MedicalFileCard(
SizedBox(width: 8.h), label: LocaleKeys.labResults.tr(context: context),
Column( textColor: AppColors.blackColor,
crossAxisAlignment: CrossAxisAlignment.start, backgroundColor: AppColors.whiteColor,
children: [ svgIcon: AppAssets.lab_result_icon,
LocaleKeys.setReminder.tr(context: context).toText13(isBold: true), iconSize: 40,
"Notify me before the appointment".needTranslation.toText11(color: AppColors.textColorLight, weight: FontWeight.w500), isLargeText: true,
],
), ),
const Spacer(), MedicalFileCard(
Switch( label: LocaleKeys.radiology.tr(context: context),
activeColor: AppColors.successColor, textColor: AppColors.blackColor,
activeTrackColor: AppColors.successColor.withValues(alpha: .15), backgroundColor: AppColors.whiteColor,
value: widget.patientAppointmentHistoryResponseModel.hasReminder!, svgIcon: AppAssets.radiology_icon,
onChanged: (newValue) { iconSize: 40,
setState(() { isLargeText: true,
myAppointmentsViewModel.setAppointmentReminder(newValue, widget.patientAppointmentHistoryResponseModel);
});
},
), ),
], ],
).paddingSymmetrical(16.h, 16.h), ),
), LocaleKeys.prescriptions.tr().toText18(isBold: true),
SizedBox(height: 16.h), SizedBox(height: 16.h),
], Consumer<PrescriptionsViewModel>(builder: (context, prescriptionVM, child) {
) return prescriptionVM.isPrescriptionsDetailsLoading
: Column( ? const MoviesShimmerWidget()
crossAxisAlignment: CrossAxisAlignment.start, : Container(
children: [ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
"Lab & Radiology".needTranslation.toText18(isBold: true), color: Colors.white,
SizedBox(height: 16.h), borderRadius: 20.h,
GridView( ),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13.h, mainAxisSpacing: 13.h, childAspectRatio: 7 / 6), child: Padding(
physics: NeverScrollableScrollPhysics(), padding: EdgeInsets.all(16.h),
shrinkWrap: true, child: Column(
children: [ children: [
MedicalFileCard( ListView.separated(
label: LocaleKeys.labResults.tr(context: context), itemCount: prescriptionVM.prescriptionDetailsList.length,
textColor: AppColors.blackColor, shrinkWrap: true,
backgroundColor: AppColors.whiteColor, padding: const EdgeInsets.only(left: 0, right: 8),
svgIcon: AppAssets.lab_result_icon, physics: NeverScrollableScrollPhysics(),
iconSize: 40, itemBuilder: (context, index) {
isLargeText: true, return AnimationConfiguration.staggeredList(
), position: index,
MedicalFileCard( duration: const Duration(milliseconds: 500),
label: LocaleKeys.radiology.tr(context: context), child: SlideAnimation(
textColor: AppColors.blackColor, verticalOffset: 100.0,
backgroundColor: AppColors.whiteColor, child: FadeInAnimation(
svgIcon: AppAssets.radiology_icon, child: Row(
iconSize: 40, children: [
isLargeText: true, Utils.buildSvgWithAssets(
), icon: AppAssets.prescription_item_icon,
], width: 40.h,
), height: 40.h,
LocaleKeys.prescriptions.tr().toText18(isBold: true), ),
SizedBox(height: 16.h), SizedBox(width: 8.h),
Consumer<PrescriptionsViewModel>(builder: (context, prescriptionVM, child) { Row(
return prescriptionVM.isPrescriptionsDetailsLoading mainAxisSize: MainAxisSize.max,
? const MoviesShimmerWidget() children: [
: Container( Column(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( children: [
color: Colors.white, SizedBox(width: 150.h, child: prescriptionVM.prescriptionDetailsList[index].itemDescription!.toText12(isBold: true, maxLine: 1)),
borderRadius: 20.h, SizedBox(
), width: 150.h,
child: Padding( child:
padding: EdgeInsets.all(16.h), "Prescribed By: ${widget.patientAppointmentHistoryResponseModel.doctorTitle} ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}"
child: Column( .needTranslation
children: [ .toText10(weight: FontWeight.w500, color: AppColors.greyTextColor, letterSpacing: -0.4),
ListView.separated( ),
itemCount: prescriptionVM.prescriptionDetailsList.length, ],
shrinkWrap: true, ),
padding: const EdgeInsets.only(left: 0, right: 8), SizedBox(width: 68.h),
physics: NeverScrollableScrollPhysics(), Utils.buildSvgWithAssets(
itemBuilder: (context, index) { icon: AppAssets.forward_arrow_icon,
return AnimationConfiguration.staggeredList( iconColor: AppColors.blackColor,
position: index, width: 18.h,
duration: const Duration(milliseconds: 500), height: 13.h,
child: SlideAnimation( fit: BoxFit.contain,
verticalOffset: 100.0, ),
child: FadeInAnimation( ],
child: Row( ),
children: [ ],
Utils.buildSvgWithAssets( ),
icon: AppAssets.prescription_item_icon,
width: 40.h,
height: 40.h,
),
SizedBox(width: 8.h),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Column(
children: [
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),
),
],
),
SizedBox(width: 68.h),
Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon,
iconColor: AppColors.blackColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
),
],
),
],
), ),
), ),
);
},
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
).onPress(() {
prescriptionVM.setPrescriptionsDetailsLoading();
Navigator.of(context).push(
FadePage(
page: PrescriptionDetailPage(prescriptionsResponseModel: getPrescriptionRequestModel()),
), ),
); );
}, }),
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h), SizedBox(height: 16.h),
).onPress(() { const Divider(color: AppColors.dividerColor),
prescriptionVM.setPrescriptionsDetailsLoading(); SizedBox(height: 16.h),
Navigator.of(context).push( Row(
FadePage( children: [
page: PrescriptionDetailPage(prescriptionsResponseModel: getPrescriptionRequestModel()), // Expanded(
), // child: CustomButton(
); // text: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? LocaleKeys.resendOrder.tr(context: context) : LocaleKeys.prescriptionDeliveryError.tr(context: context),
}), // onPressed: () {},
SizedBox(height: 16.h), // backgroundColor: AppColors.secondaryLightRedColor,
const Divider(color: AppColors.dividerColor), // borderColor: AppColors.secondaryLightRedColor,
SizedBox(height: 16.h), // textColor: AppColors.primaryRedColor,
Row( // fontSize: 14,
children: [ // fontWeight: FontWeight.w500,
// Expanded( // borderRadius: 12.h,
// child: CustomButton( // height: 40.h,
// text: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? LocaleKeys.resendOrder.tr(context: context) : LocaleKeys.prescriptionDeliveryError.tr(context: context), // icon: AppAssets.appointment_calendar_icon,
// onPressed: () {}, // iconColor: AppColors.primaryRedColor,
// backgroundColor: AppColors.secondaryLightRedColor, // iconSize: 16.h,
// borderColor: AppColors.secondaryLightRedColor, // ),
// textColor: AppColors.primaryRedColor, // ),
// fontSize: 14, // SizedBox(width: 16.h),
// fontWeight: FontWeight.w500, Expanded(
// borderRadius: 12.h, child: CustomButton(
// height: 40.h, text: "All Prescriptions".needTranslation,
// icon: AppAssets.appointment_calendar_icon, onPressed: () {
// iconColor: AppColors.primaryRedColor, Navigator.of(context)
// iconSize: 16.h, .push(
// ), FadePage(
// ), page: PrescriptionsListPage(),
// SizedBox(width: 16.h), ),
Expanded( )
child: CustomButton( .then((val) {
text: "All Prescriptions".needTranslation, prescriptionsViewModel.setPrescriptionsDetailsLoading();
onPressed: () { prescriptionsViewModel.getPrescriptionDetails(getPrescriptionRequestModel());
Navigator.of(context) });
.push( },
FadePage( backgroundColor: AppColors.secondaryLightRedColor,
page: PrescriptionsListPage(), borderColor: AppColors.secondaryLightRedColor,
), textColor: AppColors.primaryRedColor,
) fontSize: 14,
.then((val) { fontWeight: FontWeight.w500,
prescriptionsViewModel.setPrescriptionsDetailsLoading(); borderRadius: 12.h,
prescriptionsViewModel.getPrescriptionDetails(getPrescriptionRequestModel()); height: 40.h,
}); icon: AppAssets.requests,
}, iconColor: AppColors.primaryRedColor,
backgroundColor: AppColors.secondaryLightRedColor, iconSize: 16.h,
borderColor: AppColors.secondaryLightRedColor, ),
textColor: AppColors.primaryRedColor,
fontSize: 14,
fontWeight: FontWeight.w500,
borderRadius: 12.h,
height: 40.h,
icon: AppAssets.requests,
iconColor: AppColors.primaryRedColor,
iconSize: 16.h,
), ),
), ],
], ),
), ],
], ),
), ),
), );
); }),
}), ],
], ),
), ],
], ).paddingSymmetrical(24.h, 24.h),
).paddingSymmetrical(24.h, 24.h), ),
), ),
), ),
Container( Container(

@ -9,7 +9,6 @@ import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/cache_consts.dart'; import 'package:hmg_patient_app_new/core/cache_consts.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/enums.dart'; import 'package:hmg_patient_app_new/core/enums.dart';
import 'package:hmg_patient_app_new/features/authentication/models/resp_models/authenticated_user_resp_model.dart';
import 'package:hmg_patient_app_new/features/payfort/models/apple_pay_request_insert_model.dart'; import 'package:hmg_patient_app_new/features/payfort/models/apple_pay_request_insert_model.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart';
@ -22,6 +21,7 @@ import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/my_appointments_page.dart'; import 'package:hmg_patient_app_new/presentation/appointments/my_appointments_page.dart';
import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart'; import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
import 'package:hmg_patient_app_new/presentation/insurance/insurance_home_page.dart'; import 'package:hmg_patient_app_new/presentation/insurance/insurance_home_page.dart';
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/services/cache_service.dart'; import 'package:hmg_patient_app_new/services/cache_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -72,131 +72,131 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
payfortViewModel = Provider.of<PayfortViewModel>(context); payfortViewModel = Provider.of<PayfortViewModel>(context);
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
appBar: AppBar(
title: "Appointment Payment".needTranslation.toText18(),
backgroundColor: AppColors.bgScaffoldColor,
),
body: Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) { body: Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) {
return myAppointmentsVM.isAppointmentPatientShareLoading return Column(
? const MoviesShimmerWidget().paddingAll(24.h) children: [
: Column( Expanded(
children: [ child: CollapsingListView(
Expanded( title: "Appointment Payment".needTranslation,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: myAppointmentsVM.isAppointmentPatientShareLoading
crossAxisAlignment: CrossAxisAlignment.start, ? const MoviesShimmerWidget().paddingAll(24.h)
children: [ : Column(
"Appointment Payment".needTranslation.toText24(isBold: true).paddingSymmetrical(24.h, 0.h), crossAxisAlignment: CrossAxisAlignment.start,
SizedBox(height: 24.h), children: [
Container( SizedBox(height: 24.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( Container(
color: AppColors.whiteColor, decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
borderRadius: 20.h, color: AppColors.whiteColor,
hasShadow: false, borderRadius: 20.h,
), hasShadow: false,
child: Row( ),
mainAxisSize: MainAxisSize.max, child: Row(
children: [ mainAxisSize: MainAxisSize.max,
Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Image.asset(AppAssets.mada, width: 72.h, height: 25.h), children: [
SizedBox(height: 16.h), Image.asset(AppAssets.mada, width: 72.h, height: 25.h),
"Mada".needTranslation.toText16(isBold: true), SizedBox(height: 16.h),
], "Mada".needTranslation.toText16(isBold: true),
), ],
SizedBox(width: 8.h), ),
const Spacer(), SizedBox(width: 8.h),
Utils.buildSvgWithAssets( const Spacer(),
icon: AppAssets.forward_arrow_icon, Utils.buildSvgWithAssets(
iconColor: AppColors.blackColor, icon: AppAssets.forward_arrow_icon,
width: 18.h, iconColor: AppColors.blackColor,
height: 13.h, width: 18.h,
fit: BoxFit.contain, height: 13.h,
), fit: BoxFit.contain,
], ),
).paddingSymmetrical(16.h, 16.h), ],
).paddingSymmetrical(24.h, 0.h).onPress(() { ).paddingSymmetrical(16.h, 16.h),
selectedPaymentMethod = "MADA"; ).paddingSymmetrical(24.h, 0.h).onPress(() {
openPaymentURL("mada"); selectedPaymentMethod = "MADA";
}), openPaymentURL("mada");
SizedBox(height: 16.h), }),
Container( SizedBox(height: 16.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( Container(
color: AppColors.whiteColor, decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
borderRadius: 20.h, color: AppColors.whiteColor,
hasShadow: false, borderRadius: 20.h,
), hasShadow: false,
child: Row( ),
mainAxisSize: MainAxisSize.max, child: Row(
children: [ mainAxisSize: MainAxisSize.max,
Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Row( children: [
children: [ Row(
Image.asset(AppAssets.visa, width: 50.h, height: 50.h), children: [
SizedBox(width: 8.h), Image.asset(AppAssets.visa, width: 50.h, height: 50.h),
Image.asset(AppAssets.Mastercard, width: 40.h, height: 40.h), SizedBox(width: 8.h),
], Image.asset(AppAssets.Mastercard, width: 40.h, height: 40.h),
), ],
SizedBox(height: 16.h), ),
"Visa or Mastercard".needTranslation.toText16(isBold: true), SizedBox(height: 16.h),
], "Visa or Mastercard".needTranslation.toText16(isBold: true),
), ],
SizedBox(width: 8.h), ),
const Spacer(), SizedBox(width: 8.h),
Utils.buildSvgWithAssets( const Spacer(),
icon: AppAssets.forward_arrow_icon, Utils.buildSvgWithAssets(
iconColor: AppColors.blackColor, icon: AppAssets.forward_arrow_icon,
width: 18.h, iconColor: AppColors.blackColor,
height: 13.h, width: 18.h,
fit: BoxFit.contain, height: 13.h,
), fit: BoxFit.contain,
], ),
).paddingSymmetrical(16.h, 16.h), ],
).paddingSymmetrical(24.h, 0.h).onPress(() { ).paddingSymmetrical(16.h, 16.h),
selectedPaymentMethod = "VISA"; ).paddingSymmetrical(24.h, 0.h).onPress(() {
openPaymentURL("visa"); selectedPaymentMethod = "VISA";
}), openPaymentURL("visa");
SizedBox(height: 16.h), }),
Container( SizedBox(height: 16.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( Container(
color: AppColors.whiteColor, decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
borderRadius: 20.h, color: AppColors.whiteColor,
hasShadow: false, borderRadius: 20.h,
), hasShadow: false,
child: Row( ),
mainAxisSize: MainAxisSize.max, child: Row(
children: [ mainAxisSize: MainAxisSize.max,
Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Image.asset(AppAssets.tamara_en, width: 72.h, height: 25.h), children: [
SizedBox(height: 16.h), Image.asset(AppAssets.tamara_en, width: 72.h, height: 25.h),
"Tamara".needTranslation.toText16(isBold: true), SizedBox(height: 16.h),
], "Tamara".needTranslation.toText16(isBold: true),
), ],
SizedBox(width: 8.h), ),
const Spacer(), SizedBox(width: 8.h),
Utils.buildSvgWithAssets( const Spacer(),
icon: AppAssets.forward_arrow_icon, Utils.buildSvgWithAssets(
iconColor: AppColors.blackColor, icon: AppAssets.forward_arrow_icon,
width: 18.h, iconColor: AppColors.blackColor,
height: 13.h, width: 18.h,
fit: BoxFit.contain, height: 13.h,
), fit: BoxFit.contain,
], ),
).paddingSymmetrical(16.h, 16.h), ],
).paddingSymmetrical(24.h, 0.h).onPress(() { ).paddingSymmetrical(16.h, 16.h),
selectedPaymentMethod = "TAMARA"; ).paddingSymmetrical(24.h, 0.h).onPress(() {
openPaymentURL("tamara"); selectedPaymentMethod = "TAMARA";
}), openPaymentURL("tamara");
], }),
), ],
), ),
), ),
Container( ),
),
myAppointmentsVM.isAppointmentPatientShareLoading
? SizedBox.shrink()
: Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, color: AppColors.whiteColor,
borderRadius: 24.h, borderRadius: 24.h,
@ -292,8 +292,8 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
); );
}), }),
), ),
], ],
); );
}), }),
); );
} }

@ -1,17 +1,14 @@
import 'dart:async'; import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart'; import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart'; 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/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart'; import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart';
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/custom_tab_bar.dart'; import 'package:hmg_patient_app_new/widgets/custom_tab_bar.dart';
import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart'; import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart';
@ -41,36 +38,30 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
myAppointmentsViewModel = Provider.of<MyAppointmentsViewModel>(context); myAppointmentsViewModel = Provider.of<MyAppointmentsViewModel>(context);
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
appBar: AppBar( body: CollapsingListView(
title: "Appointments List".needTranslation.toText18(), title: "Appointments List".needTranslation,
backgroundColor: AppColors.bgScaffoldColor, child: SingleChildScrollView(
), child: Column(
body: SingleChildScrollView( children: [
child: Column( SizedBox(height: 16.h),
children: [ CustomTabBar(
Row( activeTextColor: Color(0xffED1C2B),
mainAxisAlignment: MainAxisAlignment.spaceBetween, activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1),
children: [ tabs: [
"Appointments List".needTranslation.toText24(isBold: true), CustomTabBarModel(null, "All Appt.".needTranslation),
], CustomTabBarModel(null, "Upcoming".needTranslation),
).paddingSymmetrical(24.h, 24.h), CustomTabBarModel(null, "Completed".needTranslation),
CustomTabBar( ],
activeTextColor: Color(0xffED1C2B), onTabChange: (index) {
activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1), print(index);
tabs: [ myAppointmentsViewModel.onTabChange(index);
CustomTabBarModel(null, "All Appt.".needTranslation), },
CustomTabBarModel(null, "Upcoming".needTranslation), ).paddingSymmetrical(24.h, 0.h),
CustomTabBarModel(null, "Completed".needTranslation), Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) {
], return getSelectedTabData(myAppointmentsVM.selectedTabIndex, myAppointmentsVM);
onTabChange: (index) { }),
print(index); ],
myAppointmentsViewModel.onTabChange(index); ),
},
).paddingSymmetrical(24.h, 0.h),
Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) {
return getSelectedTabData(myAppointmentsVM.selectedTabIndex, myAppointmentsVM);
}),
],
), ),
), ),
); );
@ -83,7 +74,6 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 24.h),
// Expandable list // Expandable list
ListView.separated( ListView.separated(
shrinkWrap: true, shrinkWrap: true,
@ -127,7 +117,6 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 24.h),
// Expandable list // Expandable list
ListView.separated( ListView.separated(
shrinkWrap: true, shrinkWrap: true,
@ -171,7 +160,6 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 24.h),
// Expandable list // Expandable list
ListView.separated( ListView.separated(
shrinkWrap: true, shrinkWrap: true,

@ -142,7 +142,7 @@ class _AppointmentCardState extends State<AppointmentCard> {
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
spacing: 3.h, spacing: 3.h,
runSpacing: -8.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget(labelText: widget.patientAppointmentHistoryResponseModel.clinicName!), AppCustomChipWidget(labelText: widget.patientAppointmentHistoryResponseModel.clinicName!),
AppCustomChipWidget(labelText: widget.patientAppointmentHistoryResponseModel.projectName!), AppCustomChipWidget(labelText: widget.patientAppointmentHistoryResponseModel.projectName!),

@ -51,7 +51,7 @@ class AppointmentDoctorCard extends StatelessWidget {
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
spacing: 3.h, spacing: 3.h,
runSpacing: -8.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget(labelText: patientAppointmentHistoryResponseModel.clinicName!), AppCustomChipWidget(labelText: patientAppointmentHistoryResponseModel.clinicName!),
AppCustomChipWidget(labelText: patientAppointmentHistoryResponseModel.projectName!), AppCustomChipWidget(labelText: patientAppointmentHistoryResponseModel.projectName!),

@ -10,6 +10,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/habib_wallet/models/habib_wallet_view_model.dart'; import 'package:hmg_patient_app_new/features/habib_wallet/models/habib_wallet_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/recharge_wallet_page.dart'; import 'package:hmg_patient_app_new/presentation/habib_wallet/recharge_wallet_page.dart';
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart'; import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart';
@ -28,81 +29,78 @@ class _HabibWalletState extends State<HabibWalletPage> {
AppState _appState = getIt.get<AppState>(); AppState _appState = getIt.get<AppState>();
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
appBar: AppBar( body: CollapsingListView(
title: LocaleKeys.myWallet.tr(context: context).toText18(), title: LocaleKeys.myWallet.tr(),
backgroundColor: AppColors.bgScaffoldColor, child: Padding(
), padding: EdgeInsets.all(24.h),
body: Padding( child: SingleChildScrollView(
padding: EdgeInsets.all(24.h), child: Column(
child: SingleChildScrollView( crossAxisAlignment: CrossAxisAlignment.start,
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, Container(
children: [ width: double.infinity,
LocaleKeys.myWallet.tr(context: context).toText24(isBold: true), height: 180.h,
SizedBox(height: 24.h), decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
Container( color: AppColors.blackBgColor,
width: double.infinity, borderRadius: 24,
height: 180.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.blackBgColor,
borderRadius: 24,
),
child: Padding(
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"${_appState.getAuthenticatedUser()!.firstName!} ${_appState.getAuthenticatedUser()!.lastName!}".toText19(isBold: true, color: AppColors.whiteColor),
"MRN: ${_appState.getAuthenticatedUser()!.patientId!}".toText14(weight: FontWeight.w500, color: AppColors.greyTextColor),
],
),
Utils.buildSvgWithAssets(icon: AppAssets.habiblogo, width: 24.h, height: 24.h),
],
),
Spacer(),
LocaleKeys.balanceAmount.tr(context: context).toText14(weight: FontWeight.w500, color: AppColors.whiteColor),
Consumer<HabibWalletViewModel>(builder: (context, habibWalletVM, child) {
return Utils.getPaymentAmountWithSymbol(habibWalletVM.habibWalletAmount.toString().toText32(isBold: true, color: AppColors.whiteColor), AppColors.whiteColor, 13.h,
isExpanded: false)
.toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.h);
}),
],
), ),
), child: Padding(
), padding: EdgeInsets.all(16.h),
SizedBox(height: 16.h), child: Column(
Row( crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, children: [
children: [ Row(
CustomButton( mainAxisAlignment: MainAxisAlignment.spaceBetween,
icon: AppAssets.recharge_icon, children: [
iconSize: 21.h, Column(
text: "Recharge".needTranslation, crossAxisAlignment: CrossAxisAlignment.start,
onPressed: () { children: [
Navigator.of(context).push( "${_appState.getAuthenticatedUser()!.firstName!} ${_appState.getAuthenticatedUser()!.lastName!}".toText19(isBold: true, color: AppColors.whiteColor),
FadePage( "MRN: ${_appState.getAuthenticatedUser()!.patientId!}".toText14(weight: FontWeight.w500, color: AppColors.greyTextColor),
page: RechargeWalletPage(), ],
),
Utils.buildSvgWithAssets(icon: AppAssets.habiblogo, width: 24.h, height: 24.h),
],
), ),
); Spacer(),
}, LocaleKeys.balanceAmount.tr(context: context).toText14(weight: FontWeight.w500, color: AppColors.whiteColor),
backgroundColor: AppColors.infoColor, Consumer<HabibWalletViewModel>(builder: (context, habibWalletVM, child) {
borderColor: AppColors.infoColor, return Utils.getPaymentAmountWithSymbol(habibWalletVM.habibWalletAmount.toString().toText32(isBold: true, color: AppColors.whiteColor), AppColors.whiteColor, 13.h,
textColor: AppColors.whiteColor, isExpanded: false)
fontSize: 14, .toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.h, width: 80.h, height: 40.h);
fontWeight: FontWeight.bold, }),
borderRadius: 12, ],
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), ),
height: 40.h,
), ),
], ),
), SizedBox(height: 16.h),
], Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
CustomButton(
icon: AppAssets.recharge_icon,
iconSize: 21.h,
text: "Recharge".needTranslation,
onPressed: () {
Navigator.of(context).push(
FadePage(
page: RechargeWalletPage(),
),
);
},
backgroundColor: AppColors.infoColor,
borderColor: AppColors.infoColor,
textColor: AppColors.whiteColor,
fontSize: 14,
fontWeight: FontWeight.bold,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
),
],
),
],
),
), ),
), ),
), ),

@ -8,6 +8,7 @@ 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/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.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/common_bottom_sheet.dart';
@ -30,174 +31,172 @@ class _RechargeWalletPageState extends State<RechargeWalletPage> {
AppState appState = getIt.get<AppState>(); AppState appState = getIt.get<AppState>();
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
appBar: AppBar(
title: LocaleKeys.createAdvancedPayment.tr(context: context).toText18(),
backgroundColor: AppColors.bgScaffoldColor,
),
body: Column( body: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded( Expanded(
child: SingleChildScrollView( child: CollapsingListView(
child: Padding( title: LocaleKeys.createAdvancedPayment.tr(context: context),
padding: EdgeInsets.all(24.h), child: SingleChildScrollView(
child: Column( child: Padding(
crossAxisAlignment: CrossAxisAlignment.start, padding: EdgeInsets.all(24.h),
children: [ child: Column(
LocaleKeys.createAdvancedPayment.tr(context: context).toText20(isBold: true), crossAxisAlignment: CrossAxisAlignment.start,
SizedBox(height: 24.h), children: [
Container( Container(
height: 135.h, height: 135.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, color: AppColors.whiteColor,
borderRadius: 24.h, borderRadius: 24.h,
hasShadow: false, hasShadow: false,
side: BorderSide(color: AppColors.textColor, width: 2.h), side: BorderSide(color: AppColors.textColor, width: 2.h),
), ),
child: Padding( child: Padding(
padding: EdgeInsets.all(16.h), padding: EdgeInsets.all(16.h),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"Enter an amount".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), "Enter an amount".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
Spacer(), Spacer(),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
SizedBox( SizedBox(
width: 150.h, width: 150.h,
child: TextInputWidget( child: TextInputWidget(
labelText: "", labelText: "",
hintText: "", hintText: "",
isEnable: true, isEnable: true,
prefix: null, prefix: null,
isAllowRadius: true, isAllowRadius: true,
isBorderAllowed: false, isBorderAllowed: false,
isAllowLeadingIcon: true, isAllowLeadingIcon: true,
autoFocus: true, autoFocus: true,
fontSize: 40, fontSize: 40,
padding: EdgeInsets.symmetric(horizontal: 8.h, vertical: 0.h), padding: EdgeInsets.symmetric(horizontal: 8.h, vertical: 0.h),
focusNode: textFocusNode, focusNode: textFocusNode,
isWalletAmountInput: true, isWalletAmountInput: true,
// leadingIcon: AppAssets.student_card, // leadingIcon: AppAssets.student_card,
),
), ),
), AppColors.textColor,
AppColors.textColor, 13.h,
13.h, isExpanded: false),
isExpanded: false), const Spacer(),
const Spacer(), "SAR".needTranslation.toText20(color: AppColors.greyTextColor, weight: FontWeight.w500),
"SAR".needTranslation.toText20(color: AppColors.greyTextColor, weight: FontWeight.w500), ],
], ),
), ],
], ),
), ),
), ),
), SizedBox(height: 24.h),
SizedBox(height: 24.h), Container(
Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( color: AppColors.whiteColor,
color: AppColors.whiteColor, borderRadius: 24.h,
borderRadius: 24.h, hasShadow: false,
hasShadow: false, ),
), child: Padding(
child: Padding( padding: EdgeInsets.all(16.h),
padding: EdgeInsets.all(16.h), child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Row(
Row( mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
children: [ Row(
Row( children: [
children: [ Utils.buildSvgWithAssets(icon: AppAssets.my_account_icon, width: 40.h, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.my_account_icon, width: 40.h, height: 40.h), SizedBox(width: 8.h),
SizedBox(width: 8.h), Column(
Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ LocaleKeys.myAccount.tr(context: context).toText16(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.myAccount.tr(context: context).toText16(color: AppColors.textColor, weight: FontWeight.w500), "${LocaleKeys.medicalFile.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}"
"${LocaleKeys.medicalFile.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}".toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), .toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
], ],
), ),
], ],
), ),
Utils.buildSvgWithAssets(icon: AppAssets.arrow_down, width: 25.h, height: 25.h), Utils.buildSvgWithAssets(icon: AppAssets.arrow_down, width: 25.h, height: 25.h),
], ],
).onPress(() { ).onPress(() {
// showCommonBottomSheetWithoutHeight(context, title: "Select Medical File".needTranslation, child: SelectMedicalFile(), callBackFunc: () {}, isFullScreen: false); // showCommonBottomSheetWithoutHeight(context, title: "Select Medical File".needTranslation, child: SelectMedicalFile(), callBackFunc: () {}, isFullScreen: false);
showCommonBottomSheetWithoutHeight(context, title: "Select Medical File".needTranslation, child: const MultiPageBottomSheet(), callBackFunc: () {}, isFullScreen: false); showCommonBottomSheetWithoutHeight(context, title: "Select Medical File".needTranslation, child: const MultiPageBottomSheet(), callBackFunc: () {}, isFullScreen: false);
}), }),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h), Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.select_hospital_icon, width: 40.h, height: 40.h), Utils.buildSvgWithAssets(icon: AppAssets.select_hospital_icon, width: 40.h, height: 40.h),
SizedBox(width: 8.h), SizedBox(width: 8.h),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.hospital.tr(context: context).toText16(color: AppColors.textColor, weight: FontWeight.w500), LocaleKeys.hospital.tr(context: context).toText16(color: AppColors.textColor, weight: FontWeight.w500),
"Olaya".toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), "Olaya".toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
], ],
), ),
], ],
), ),
Utils.buildSvgWithAssets(icon: AppAssets.arrow_down, width: 25.h, height: 25.h), Utils.buildSvgWithAssets(icon: AppAssets.arrow_down, width: 25.h, height: 25.h),
], ],
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h), Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.email_icon, width: 40.h, height: 40.h), Utils.buildSvgWithAssets(icon: AppAssets.email_icon, width: 40.h, height: 40.h),
SizedBox(width: 8.h), SizedBox(width: 8.h),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.email.tr(context: context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), LocaleKeys.email.tr(context: context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
"${appState.getAuthenticatedUser()!.emailAddress}".toText16(color: AppColors.textColor, weight: FontWeight.w500), "${appState.getAuthenticatedUser()!.emailAddress}".toText16(color: AppColors.textColor, weight: FontWeight.w500),
], ],
), ),
], ],
), ),
], ],
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h), Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.notes_icon, width: 40.h, height: 40.h), Utils.buildSvgWithAssets(icon: AppAssets.notes_icon, width: 40.h, height: 40.h),
SizedBox(width: 8.h), SizedBox(width: 8.h),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.notes.tr(context: context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), LocaleKeys.notes.tr(context: context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
"Lorem Ipsum".toText16(color: AppColors.textColor, weight: FontWeight.w500), "Lorem Ipsum".toText16(color: AppColors.textColor, weight: FontWeight.w500),
], ],
), ),
], ],
), ),
], ],
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
], ],
),
), ),
), ),
), ],
], ),
), ),
), ),
)), )),

@ -136,8 +136,8 @@ class _MultiPageBottomSheetState extends State<MultiPageBottomSheet> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.myMedicalFile.tr(context: context).toText16(color: AppColors.textColor, weight: FontWeight.w500), LocaleKeys.familyTitle.tr(context: context).toText16(color: AppColors.textColor, weight: FontWeight.w500),
"${LocaleKeys.fileno.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}".toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), "Select a medical file from your family".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
], ],
), ),
Utils.buildSvgWithAssets(icon: AppAssets.forward_chevron_icon, iconColor: AppColors.textColor, width: 15.h, height: 15.h), Utils.buildSvgWithAssets(icon: AppAssets.forward_chevron_icon, iconColor: AppColors.textColor, width: 15.h, height: 15.h),
@ -157,14 +157,20 @@ class _MultiPageBottomSheetState extends State<MultiPageBottomSheet> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.myMedicalFile.tr(context: context).toText16(color: AppColors.textColor, weight: FontWeight.w500), LocaleKeys.otherAccount.tr(context: context).toText16(color: AppColors.textColor, weight: FontWeight.w500),
"${LocaleKeys.fileno.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}".toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), "Any active medical file from HMG".toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
], ],
), ),
Utils.buildSvgWithAssets(icon: AppAssets.forward_chevron_icon, iconColor: AppColors.textColor, width: 15.h, height: 15.h), Utils.buildSvgWithAssets(icon: AppAssets.forward_chevron_icon, iconColor: AppColors.textColor, width: 15.h, height: 15.h),
], ],
).paddingAll(16.h), ).paddingAll(16.h),
), ).onPress(() {
_pageController.animateToPage(
2,
duration: const Duration(milliseconds: 300),
curve: Curves.easeInOut,
);
}),
], ],
); );
} }

@ -84,7 +84,7 @@ class HabibWalletCard extends StatelessWidget {
fit: BoxFit.contain, fit: BoxFit.contain,
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
habibWalletVM.habibWalletAmount.toString().toText32(isBold: true).toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.h), habibWalletVM.habibWalletAmount.toString().toText32(isBold: true).toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.h, width: 80.h, height: 40.h),
], ],
); );
}), }),

@ -9,6 +9,7 @@ import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/features/insurance/insurance_view_model.dart'; import 'package:hmg_patient_app_new/features/insurance/insurance_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/insurance/widgets/patient_insurance_card.dart'; import 'package:hmg_patient_app_new/presentation/insurance/widgets/patient_insurance_card.dart';
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/presentation/lab/search_lab_report.dart'; import 'package:hmg_patient_app_new/presentation/lab/search_lab_report.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
@ -42,49 +43,48 @@ class _InsuranceHomePageState extends State<InsuranceHomePage> {
insuranceViewModel = Provider.of<InsuranceViewModel>(context); insuranceViewModel = Provider.of<InsuranceViewModel>(context);
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
appBar: AppBar( body: CollapsingListView(
title: LocaleKeys.insurance.tr(context: context).toText18(), title: "${LocaleKeys.insurance.tr(context: context)} ${LocaleKeys.updateInsurance.tr(context: context)}",
backgroundColor: AppColors.bgScaffoldColor, child: SingleChildScrollView(
), child: Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
body: SingleChildScrollView( return Column(
child: Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) { crossAxisAlignment: CrossAxisAlignment.start,
return Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, Row(
children: [ mainAxisAlignment: MainAxisAlignment.spaceBetween,
Row( children: [
mainAxisAlignment: MainAxisAlignment.spaceBetween, "${LocaleKeys.insurance.tr(context: context)} ${LocaleKeys.updateInsurance.tr(context: context)}".toText24(isBold: true),
children: [ CustomButton(
"${LocaleKeys.insurance.tr(context: context)} ${LocaleKeys.updateInsurance.tr(context: context)}".toText24(isBold: true), icon: AppAssets.insurance_history_icon,
CustomButton( iconColor: AppColors.primaryRedColor,
icon: AppAssets.insurance_history_icon, iconSize: 21.h,
iconColor: AppColors.primaryRedColor, text: LocaleKeys.history.tr(context: context),
iconSize: 21.h, onPressed: () {
text: LocaleKeys.history.tr(context: context), insuranceVM.setIsInsuranceHistoryLoading(true);
onPressed: () { insuranceVM.getPatientInsuranceCardHistory();
insuranceVM.setIsInsuranceHistoryLoading(true); showCommonBottomSheet(context,
insuranceVM.getPatientInsuranceCardHistory(); child: InsuranceHistory(), callBackFunc: (str) {}, title: "", height: ResponsiveExtension.screenHeight * 0.65, isCloseButtonVisible: false, isFullScreen: false);
showCommonBottomSheet(context, },
child: InsuranceHistory(), callBackFunc: (str){}, title: "", height: ResponsiveExtension.screenHeight * 0.65, isCloseButtonVisible: false, isFullScreen: false); backgroundColor: AppColors.primaryRedColor.withOpacity(0.1),
}, borderColor: AppColors.primaryRedColor.withOpacity(0.0),
backgroundColor: AppColors.primaryRedColor.withOpacity(0.1), textColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor.withOpacity(0.0), fontSize: 14,
textColor: AppColors.primaryRedColor, fontWeight: FontWeight.w600,
fontSize: 14, borderRadius: 12,
fontWeight: FontWeight.w600, padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
borderRadius: 12, height: 40.h,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), ),
height: 40.h, ],
), ).paddingSymmetrical(24.h, 24.h),
], insuranceVM.isInsuranceLoading
).paddingSymmetrical(24.h, 24.h), ? const MoviesShimmerWidget().paddingSymmetrical(24.h, 0)
insuranceVM.isInsuranceLoading : PatientInsuranceCard(
? const MoviesShimmerWidget().paddingSymmetrical(24.h, 0) insuranceCardDetailsModel: insuranceVM.patientInsuranceList.first,
: PatientInsuranceCard( isInsuranceExpired: DateTime.now().isAfter(DateUtil.convertStringToDate(insuranceVM.patientInsuranceList.first.cardValidTo))),
insuranceCardDetailsModel: insuranceVM.patientInsuranceList.first, ],
isInsuranceExpired: DateTime.now().isAfter(DateUtil.convertStringToDate(insuranceVM.patientInsuranceList.first.cardValidTo))), );
], }),
); ),
}),
), ),
); );
} }

@ -69,7 +69,7 @@ class PatientInsuranceCardUpdateCard extends StatelessWidget {
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
spacing: 4.h, spacing: 4.h,
runSpacing: -8.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.doctor_calendar_icon, icon: AppAssets.doctor_calendar_icon,

@ -75,7 +75,7 @@ class PatientInsuranceCard extends StatelessWidget {
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
spacing: 4.h, spacing: 4.h,
runSpacing: -8.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.doctor_calendar_icon, icon: AppAssets.doctor_calendar_icon,

@ -4,26 +4,15 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart'; import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/enums.dart'; import 'package:hmg_patient_app_new/core/enums.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
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/lab/models/resp_models/patient_lab_orders_response_model.dart'; import 'package:hmg_patient_app_new/features/lab/models/resp_models/patient_lab_orders_response_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart'; import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart';
// import 'package:hmg_patient_app_new/presentation/lab/collapse_example.dart';
import 'package:hmg_patient_app_new/presentation/lab/lab_result_item_view.dart'; import 'package:hmg_patient_app_new/presentation/lab/lab_result_item_view.dart';
import 'package:hmg_patient_app_new/presentation/lab/search_lab_report.dart'; import 'package:hmg_patient_app_new/presentation/lab/search_lab_report.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:hmg_patient_app_new/widgets/chip/custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/custom_chip_widget.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'collapsing_list_view.dart'; import 'collapsing_list_view.dart';

@ -13,6 +13,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/prescriptions/models/resp_models/patient_prescriptions_response_model.dart'; import 'package:hmg_patient_app_new/features/prescriptions/models/resp_models/patient_prescriptions_response_model.dart';
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart'; import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_item_view.dart'; import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_item_view.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_reminder_view.dart'; import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_reminder_view.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
@ -53,94 +54,91 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
prescriptionsViewModel = Provider.of<PrescriptionsViewModel>(context, listen: false); prescriptionsViewModel = Provider.of<PrescriptionsViewModel>(context, listen: false);
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
appBar: AppBar(
title: LocaleKeys.prescriptions.tr(context: context).toText18(),
backgroundColor: AppColors.bgScaffoldColor,
),
body: Column( body: Column(
children: [ children: [
Expanded( Expanded(
child: SingleChildScrollView( child: CollapsingListView(
child: Consumer<PrescriptionsViewModel>(builder: (context, prescriptionVM, child) { title: LocaleKeys.prescriptions.tr(context: context),
return Column( child: SingleChildScrollView(
crossAxisAlignment: CrossAxisAlignment.start, child: Consumer<PrescriptionsViewModel>(builder: (context, prescriptionVM, child) {
children: [ return Column(
LocaleKeys.prescriptions.tr(context: context).toText24(isBold: true).paddingSymmetrical(24.h, 0.h), crossAxisAlignment: CrossAxisAlignment.start,
SizedBox(height: 24.h), children: [
Container( SizedBox(height: 24.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( Container(
color: AppColors.whiteColor, decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
borderRadius: 20.h, color: AppColors.whiteColor,
hasShadow: true, borderRadius: 20.h,
), hasShadow: true,
child: Padding( ),
padding: EdgeInsets.all(16.h), child: Padding(
child: Column( padding: EdgeInsets.all(16.h),
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Row( children: [
mainAxisSize: MainAxisSize.min, Row(
children: [ mainAxisSize: MainAxisSize.min,
Image.network( children: [
widget.prescriptionsResponseModel.doctorImageURL!, Image.network(
width: 24.h, widget.prescriptionsResponseModel.doctorImageURL!,
height: 24.h, width: 24.h,
fit: BoxFit.fill, height: 24.h,
).circle(100), fit: BoxFit.fill,
SizedBox(width: 8.h), ).circle(100),
Expanded(child: widget.prescriptionsResponseModel.doctorName!.toText16(isBold: true)), SizedBox(width: 8.h),
], Expanded(child: widget.prescriptionsResponseModel.doctorName!.toText16(isBold: true)),
), ],
SizedBox(height: 16.h), ),
Wrap( SizedBox(height: 16.h),
direction: Axis.horizontal, Wrap(
spacing: 4.h, direction: Axis.horizontal,
runSpacing: -8.h, spacing: 4.h,
children: [ runSpacing: 4.h,
AppCustomChipWidget( children: [
icon: AppAssets.doctor_calendar_icon, AppCustomChipWidget(
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.prescriptionsResponseModel.appointmentDate), false), icon: AppAssets.doctor_calendar_icon,
), labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.prescriptionsResponseModel.appointmentDate), false),
AppCustomChipWidget( ),
labelText: widget.prescriptionsResponseModel.clinicDescription!, AppCustomChipWidget(
), labelText: widget.prescriptionsResponseModel.clinicDescription!,
AppCustomChipWidget( ),
icon: AppAssets.rating_icon, AppCustomChipWidget(
iconColor: AppColors.ratingColorYellow, icon: AppAssets.rating_icon,
labelText: "Rating: ${widget.prescriptionsResponseModel.decimalDoctorRate}".needTranslation, iconColor: AppColors.ratingColorYellow,
), labelText: "Rating: ${widget.prescriptionsResponseModel.decimalDoctorRate}".needTranslation,
AppCustomChipWidget( ),
labelText: widget.prescriptionsResponseModel.name!, AppCustomChipWidget(
), labelText: widget.prescriptionsResponseModel.name!,
], ),
), ],
], ),
],
),
), ),
), ).paddingSymmetrical(24.h, 0.h),
).paddingSymmetrical(24.h, 0.h), ListView.builder(
SizedBox(height: 16.h), shrinkWrap: true,
ListView.builder( physics: NeverScrollableScrollPhysics(),
shrinkWrap: true, itemCount: prescriptionVM.isPrescriptionsDetailsLoading ? 5 : prescriptionVM.prescriptionDetailsList.length,
physics: NeverScrollableScrollPhysics(), itemBuilder: (context, index) {
itemCount: prescriptionVM.isPrescriptionsDetailsLoading ? 5 : prescriptionVM.prescriptionDetailsList.length, return prescriptionVM.isPrescriptionsDetailsLoading
itemBuilder: (context, index) { ? PrescriptionItemView(prescriptionVM: prescriptionVM, index: index, isLoading: true)
return prescriptionVM.isPrescriptionsDetailsLoading : AnimationConfiguration.staggeredList(
? PrescriptionItemView(prescriptionVM: prescriptionVM, index: index, isLoading: true) position: index,
: AnimationConfiguration.staggeredList( duration: const Duration(milliseconds: 500),
position: index, child: SlideAnimation(
duration: const Duration(milliseconds: 500), verticalOffset: 100.0,
child: SlideAnimation( child: FadeInAnimation(
verticalOffset: 100.0, child: PrescriptionItemView(prescriptionVM: prescriptionVM, index: index),
child: FadeInAnimation( ),
child: PrescriptionItemView(prescriptionVM: prescriptionVM, index: index),
), ),
), );
); },
}, ).paddingSymmetrical(24.h, 0.h),
).paddingSymmetrical(24.h, 0.h), ],
], );
); }),
}), ),
), ),
), ),
Container( Container(

@ -11,6 +11,7 @@ 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/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart'; import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_detail_page.dart'; import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_detail_page.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -43,256 +44,252 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
prescriptionsViewModel = Provider.of<PrescriptionsViewModel>(context, listen: false); prescriptionsViewModel = Provider.of<PrescriptionsViewModel>(context, listen: false);
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
appBar: AppBar( body: CollapsingListView(
title: LocaleKeys.prescriptions.tr(context: context).toText18(), title: LocaleKeys.prescriptions.tr(context: context),
backgroundColor: AppColors.bgScaffoldColor, child: SingleChildScrollView(
), child: Consumer<PrescriptionsViewModel>(builder: (context, model, child) {
body: SingleChildScrollView( return Column(
child: Consumer<PrescriptionsViewModel>(builder: (context, model, child) { crossAxisAlignment: CrossAxisAlignment.start,
return Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, SizedBox(height: 16.h),
children: [ // Clinic & Hospital Sort
LocaleKeys.prescriptions.tr(context: context).toText24(isBold: true).paddingSymmetrical(24.h, 0.h), Row(
SizedBox(height: 16.h), children: [
// Build Tab Bar CustomButton(
SizedBox(height: 16.h), text: LocaleKeys.byClinic.tr(context: context),
// Clinic & Hospital Sort onPressed: () {
Row( model.setIsSortByClinic(true);
children: [ },
CustomButton( backgroundColor: model.isSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor,
text: LocaleKeys.byClinic.tr(context: context), borderColor: model.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withOpacity(0.2),
onPressed: () { textColor: model.isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor,
model.setIsSortByClinic(true); fontSize: 12,
}, fontWeight: FontWeight.w500,
backgroundColor: model.isSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor, borderRadius: 10,
borderColor: model.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withOpacity(0.2), padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
textColor: model.isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor, height: 40.h,
fontSize: 12, ),
fontWeight: FontWeight.w500, SizedBox(width: 8.h),
borderRadius: 10, CustomButton(
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), text: LocaleKeys.byHospital.tr(context: context),
height: 40.h, onPressed: () {
), model.setIsSortByClinic(false);
SizedBox(width: 8.h), },
CustomButton( backgroundColor: model.isSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor,
text: LocaleKeys.byHospital.tr(context: context), borderColor: model.isSortByClinic ? AppColors.textColor.withOpacity(0.2) : AppColors.primaryRedColor,
onPressed: () { textColor: model.isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor,
model.setIsSortByClinic(false); fontSize: 12,
}, fontWeight: FontWeight.w500,
backgroundColor: model.isSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor, borderRadius: 10,
borderColor: model.isSortByClinic ? AppColors.textColor.withOpacity(0.2) : AppColors.primaryRedColor, padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
textColor: model.isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor, height: 40.h,
fontSize: 12, ),
fontWeight: FontWeight.w500, ],
borderRadius: 10, ).paddingSymmetrical(24.h, 0.h),
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), SizedBox(height: 20.h),
height: 40.h, // Expandable list
), ListView.builder(
], itemCount: model.isPrescriptionsOrdersLoading ? 4 : model.patientPrescriptionOrdersViewList.length,
).paddingSymmetrical(24.h, 0.h), physics: NeverScrollableScrollPhysics(),
SizedBox(height: 20.h), shrinkWrap: true,
// Expandable list padding: const EdgeInsets.only(left: 0, right: 8),
ListView.builder( itemBuilder: (context, index) {
itemCount: model.isPrescriptionsOrdersLoading ? 4 : model.patientPrescriptionOrdersViewList.length, final isExpanded = expandedIndex == index;
physics: NeverScrollableScrollPhysics(), return model.isPrescriptionsOrdersLoading
shrinkWrap: true, ? const MoviesShimmerWidget()
padding: const EdgeInsets.only(left: 0, right: 8), : AnimationConfiguration.staggeredList(
itemBuilder: (context, index) { position: index,
final isExpanded = expandedIndex == index; duration: const Duration(milliseconds: 500),
return model.isPrescriptionsOrdersLoading child: SlideAnimation(
? const MoviesShimmerWidget() verticalOffset: 100.0,
: AnimationConfiguration.staggeredList( child: FadeInAnimation(
position: index, child: AnimatedContainer(
duration: const Duration(milliseconds: 500), duration: Duration(milliseconds: 300),
child: SlideAnimation( curve: Curves.easeInOut,
verticalOffset: 100.0, margin: EdgeInsets.symmetric(vertical: 8.h),
child: FadeInAnimation( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.h, hasShadow: true),
child: AnimatedContainer( child: InkWell(
duration: Duration(milliseconds: 300), onTap: () {
curve: Curves.easeInOut, setState(() {
margin: EdgeInsets.symmetric(vertical: 8.h), expandedIndex = isExpanded ? null : index;
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.h, hasShadow: true), });
child: InkWell( },
onTap: () { child: Column(
setState(() { crossAxisAlignment: CrossAxisAlignment.start,
expandedIndex = isExpanded ? null : index; children: [
}); Padding(
}, padding: EdgeInsets.all(16.h),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Row(
padding: EdgeInsets.all(16.h), mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, CustomButton(
children: [ text: "${model.patientPrescriptionOrdersViewList[index].prescriptionsList!.length} Prescriptions Available",
Row( onPressed: () {},
mainAxisAlignment: MainAxisAlignment.spaceBetween, backgroundColor: AppColors.greyColor,
children: [ borderColor: AppColors.greyColor,
CustomButton( textColor: AppColors.blackColor,
text: "${model.patientPrescriptionOrdersViewList[index].prescriptionsList!.length} Prescriptions Available", fontSize: 10,
onPressed: () {}, fontWeight: FontWeight.w500,
backgroundColor: AppColors.greyColor, borderRadius: 8,
borderColor: AppColors.greyColor, padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
textColor: AppColors.blackColor, height: 30.h,
fontSize: 10, ),
fontWeight: FontWeight.w500, Icon(isExpanded ? Icons.expand_less : Icons.expand_more),
borderRadius: 8, ],
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), ),
height: 30.h, SizedBox(height: 8.h),
), model.patientPrescriptionOrdersViewList[index].filterName!.toText16(isBold: true)
Icon(isExpanded ? Icons.expand_less : Icons.expand_more), ],
], ),
),
SizedBox(height: 8.h),
model.patientPrescriptionOrdersViewList[index].filterName!.toText16(isBold: true)
],
), ),
), AnimatedSwitcher(
AnimatedSwitcher( duration: Duration(milliseconds: 500),
duration: Duration(milliseconds: 500), switchInCurve: Curves.easeIn,
switchInCurve: Curves.easeIn, switchOutCurve: Curves.easeOut,
switchOutCurve: Curves.easeOut, transitionBuilder: (Widget child, Animation<double> animation) {
transitionBuilder: (Widget child, Animation<double> animation) { return FadeTransition(
return FadeTransition( opacity: animation,
opacity: animation, child: SizeTransition(
child: SizeTransition( sizeFactor: animation,
sizeFactor: animation, axisAlignment: 0.0,
axisAlignment: 0.0, child: child,
child: child, ),
), );
); },
}, child: isExpanded
child: isExpanded ? Container(
? Container( key: ValueKey<int>(index),
key: ValueKey<int>(index), padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 8.h),
padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 8.h), child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ ...model.patientPrescriptionOrdersViewList[index].prescriptionsList!.map((prescription) {
...model.patientPrescriptionOrdersViewList[index].prescriptionsList!.map((prescription) { return Column(
return Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Row(
Row( mainAxisSize: MainAxisSize.min,
mainAxisSize: MainAxisSize.min, children: [
children: [ Image.network(
Image.network( prescription.doctorImageURL!,
prescription.doctorImageURL!, width: 24.h,
width: 24.h, height: 24.h,
height: 24.h, fit: BoxFit.fill,
fit: BoxFit.fill, ).circle(100),
).circle(100), SizedBox(width: 8.h),
SizedBox(width: 8.h), Expanded(child: prescription.doctorName!.toText14(weight: FontWeight.w500)),
Expanded(child: prescription.doctorName!.toText14(weight: FontWeight.w500)), ],
], ),
), SizedBox(height: 8.h),
SizedBox(height: 8.h), Row(
Row( children: [
children: [ CustomButton(
CustomButton( text: DateUtil.formatDateToDate(DateUtil.convertStringToDate(prescription.appointmentDate), false),
text: DateUtil.formatDateToDate(DateUtil.convertStringToDate(prescription.appointmentDate), false), onPressed: () {},
onPressed: () {}, backgroundColor: AppColors.greyColor,
backgroundColor: AppColors.greyColor, borderColor: AppColors.greyColor,
borderColor: AppColors.greyColor, textColor: AppColors.blackColor,
textColor: AppColors.blackColor, fontSize: 10,
fontSize: 10, fontWeight: FontWeight.w500,
fontWeight: FontWeight.w500, borderRadius: 8,
borderRadius: 8, padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 24.h,
height: 24.h, ),
), SizedBox(width: 8.h),
SizedBox(width: 8.h), CustomButton(
CustomButton( text: model.isSortByClinic ? prescription.name! : prescription.clinicDescription!,
text: model.isSortByClinic ? prescription.name! : prescription.clinicDescription!,
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: 24.h,
),
],
),
SizedBox(height: 8.h),
Row(
children: [
Expanded(
flex: 6,
child: CustomButton(
text: prescription.isHomeMedicineDeliverySupported!
? LocaleKeys.resendOrder.tr(context: context)
: LocaleKeys.prescriptionDeliveryError.tr(context: context),
onPressed: () {}, onPressed: () {},
backgroundColor: prescription.isHomeMedicineDeliverySupported! ? AppColors.successColor.withOpacity(0.15) : AppColors.greyF7Color, backgroundColor: AppColors.greyColor,
borderColor: AppColors.successColor.withOpacity(0.01), borderColor: AppColors.greyColor,
textColor: prescription.isHomeMedicineDeliverySupported! ? AppColors.successColor : AppColors.textColor.withOpacity(0.35), textColor: AppColors.blackColor,
fontSize: prescription.isHomeMedicineDeliverySupported! ? 14 : 12, fontSize: 10,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12, borderRadius: 8,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h, height: 24.h,
icon: AppAssets.prescription_refill_icon,
iconColor: prescription.isHomeMedicineDeliverySupported! ? AppColors.successColor : AppColors.textColor.withOpacity(0.35),
iconSize: 14.h,
), ),
), ],
SizedBox(width: 8.h), ),
Expanded( SizedBox(height: 8.h),
flex: 1, Row(
child: Container( children: [
height: 40.h, Expanded(
width: 40.h, flex: 6,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( child: CustomButton(
color: AppColors.textColor, text: prescription.isHomeMedicineDeliverySupported!
borderRadius: 10.h, ? LocaleKeys.resendOrder.tr(context: context)
: LocaleKeys.prescriptionDeliveryError.tr(context: context),
onPressed: () {},
backgroundColor: prescription.isHomeMedicineDeliverySupported! ? AppColors.successColor.withOpacity(0.15) : AppColors.greyF7Color,
borderColor: AppColors.successColor.withOpacity(0.01),
textColor: prescription.isHomeMedicineDeliverySupported! ? AppColors.successColor : AppColors.textColor.withOpacity(0.35),
fontSize: prescription.isHomeMedicineDeliverySupported! ? 14 : 12,
fontWeight: FontWeight.w500,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
icon: AppAssets.prescription_refill_icon,
iconColor: prescription.isHomeMedicineDeliverySupported! ? AppColors.successColor : AppColors.textColor.withOpacity(0.35),
iconSize: 14.h,
), ),
child: Padding( ),
padding: EdgeInsets.all(8.h), SizedBox(width: 8.h),
child: Utils.buildSvgWithAssets( Expanded(
icon: AppAssets.forward_arrow_icon, flex: 1,
width: 10.h, child: Container(
height: 10.h, height: 40.h,
fit: BoxFit.contain, width: 40.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.textColor,
borderRadius: 10.h,
), ),
), child: Padding(
).onPress(() { padding: EdgeInsets.all(8.h),
model.setPrescriptionsDetailsLoading(); child: Utils.buildSvgWithAssets(
Navigator.of(context).push( icon: AppAssets.forward_arrow_icon,
FadePage( width: 10.h,
page: PrescriptionDetailPage(prescriptionsResponseModel: prescription), height: 10.h,
fit: BoxFit.contain,
),
), ),
); ).onPress(() {
}), model.setPrescriptionsDetailsLoading();
), Navigator.of(context).push(
], FadePage(
), page: PrescriptionDetailPage(prescriptionsResponseModel: prescription),
SizedBox(height: 12.h), ),
Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.05), height: 1.h), );
SizedBox(height: 12.h), }),
], ),
); ],
}).toList(), ),
], SizedBox(height: 12.h),
), Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.05), height: 1.h),
) SizedBox(height: 12.h),
: SizedBox.shrink(), ],
), );
], }).toList(),
],
),
)
: SizedBox.shrink(),
),
],
),
), ),
), ),
), ),
), ),
), );
); },
}, ).paddingSymmetrical(24.h, 0.h),
).paddingSymmetrical(24.h, 0.h), ],
], );
); }),
}), ),
), ),
); );
} }

@ -11,6 +11,7 @@ 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/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart'; import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart';
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart'; import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart';
@ -43,27 +44,14 @@ class _RadiologyOrdersPageState extends State<RadiologyOrdersPage> {
radiologyViewModel = Provider.of<RadiologyViewModel>(context); radiologyViewModel = Provider.of<RadiologyViewModel>(context);
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
appBar: AppBar( body: CollapsingListView(
title: LocaleKeys.radiology.tr(context: context).toText18(), title: LocaleKeys.radiology.tr(context: context),
backgroundColor: AppColors.bgScaffoldColor,
),
body: Padding(
padding: EdgeInsets.all(24.h),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Consumer<RadiologyViewModel>( child: Consumer<RadiologyViewModel>(
builder: (context, model, child) { builder: (context, model, child) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.radiology.tr(context: context).toText24(isBold: true),
Utils.buildSvgWithAssets(icon: AppAssets.search_icon),
],
),
SizedBox(height: 16.h),
// Build Tab Bar
SizedBox(height: 16.h), SizedBox(height: 16.h),
// Expandable list // Expandable list
ListView.builder( ListView.builder(

Loading…
Cancel
Save