|
|
|
|
@ -294,161 +294,154 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: 20.r,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.w),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
ListView.separated(
|
|
|
|
|
itemCount: prescriptionVM.prescriptionDetailsList.length,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: const EdgeInsets.only(left: 0, right: 8),
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return AnimationConfiguration.staggeredList(
|
|
|
|
|
position: index,
|
|
|
|
|
duration: const Duration(milliseconds: 500),
|
|
|
|
|
child: SlideAnimation(
|
|
|
|
|
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.w,
|
|
|
|
|
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.w),
|
|
|
|
|
Transform.flip(
|
|
|
|
|
flipX: appState.isArabic(),
|
|
|
|
|
child: Utils.buildSvgWithAssets(
|
|
|
|
|
icon: AppAssets.forward_arrow_icon,
|
|
|
|
|
iconColor: AppColors.blackColor,
|
|
|
|
|
width: 18.w,
|
|
|
|
|
height: 13.h,
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
),
|
|
|
|
|
padding: EdgeInsets.all(16.w),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
ListView.separated(
|
|
|
|
|
itemCount: prescriptionVM.prescriptionDetailsList.length,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: EdgeInsets.only(right: 8.w),
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return AnimationConfiguration.staggeredList(
|
|
|
|
|
position: index,
|
|
|
|
|
duration: const Duration(milliseconds: 500),
|
|
|
|
|
child: SlideAnimation(
|
|
|
|
|
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: [
|
|
|
|
|
prescriptionVM.prescriptionDetailsList[index].itemDescription!
|
|
|
|
|
.toText12(isBold: true, maxLine: 1),
|
|
|
|
|
"Prescribed By: ${widget.patientAppointmentHistoryResponseModel.doctorTitle} ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}"
|
|
|
|
|
.needTranslation
|
|
|
|
|
.toText10(
|
|
|
|
|
weight: FontWeight.w500,
|
|
|
|
|
color: AppColors.greyTextColor,
|
|
|
|
|
letterSpacing: -0.4),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 68.w),
|
|
|
|
|
Transform.flip(
|
|
|
|
|
flipX: appState.isArabic(),
|
|
|
|
|
child: Utils.buildSvgWithAssets(
|
|
|
|
|
icon: AppAssets.forward_arrow_icon,
|
|
|
|
|
iconColor: AppColors.blackColor,
|
|
|
|
|
width: 18.w,
|
|
|
|
|
height: 13.h,
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
prescriptionVM.setPrescriptionsDetailsLoading();
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: PrescriptionDetailPage(prescriptionsResponseModel: getPrescriptionRequestModel()),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
const Divider(color: AppColors.dividerColor),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: CustomButton(
|
|
|
|
|
// text: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? LocaleKeys.resendOrder.tr(context: context) : LocaleKeys.prescriptionDeliveryError.tr(context: context),
|
|
|
|
|
// onPressed: () {},
|
|
|
|
|
// backgroundColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
// borderColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
// textColor: AppColors.primaryRedColor,
|
|
|
|
|
// fontSize: 14,
|
|
|
|
|
// fontWeight: FontWeight.w500,
|
|
|
|
|
// borderRadius: 12.h,
|
|
|
|
|
// height: 40.h,
|
|
|
|
|
// icon: AppAssets.appointment_calendar_icon,
|
|
|
|
|
// iconColor: AppColors.primaryRedColor,
|
|
|
|
|
// iconSize: 16.h,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(width: 16.h),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: CustomButton(
|
|
|
|
|
text: "Refill & Delivery".needTranslation,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
.push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: PrescriptionsListPage(),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
.then((val) {
|
|
|
|
|
prescriptionsViewModel.setPrescriptionsDetailsLoading();
|
|
|
|
|
prescriptionsViewModel.getPrescriptionDetails(getPrescriptionRequestModel());
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
borderColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
textColor: AppColors.primaryRedColor,
|
|
|
|
|
fontSize: 14.f,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12.r,
|
|
|
|
|
height: 40.h,
|
|
|
|
|
icon: AppAssets.requests,
|
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
|
iconSize: 16.h,
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
prescriptionVM.setPrescriptionsDetailsLoading();
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: PrescriptionDetailPage(prescriptionsResponseModel: getPrescriptionRequestModel()),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
const Divider(color: AppColors.dividerColor),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Wrap(
|
|
|
|
|
runSpacing: 6.w,
|
|
|
|
|
children: [
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: CustomButton(
|
|
|
|
|
// text: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? LocaleKeys.resendOrder.tr(context: context) : LocaleKeys.prescriptionDeliveryError.tr(context: context),
|
|
|
|
|
// onPressed: () {},
|
|
|
|
|
// backgroundColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
// borderColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
// textColor: AppColors.primaryRedColor,
|
|
|
|
|
// fontSize: 14,
|
|
|
|
|
// fontWeight: FontWeight.w500,
|
|
|
|
|
// borderRadius: 12.h,
|
|
|
|
|
// height: 40.h,
|
|
|
|
|
// icon: AppAssets.appointment_calendar_icon,
|
|
|
|
|
// iconColor: AppColors.primaryRedColor,
|
|
|
|
|
// iconSize: 16.h,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(width: 16.h),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: CustomButton(
|
|
|
|
|
text: "Refill & Delivery".needTranslation,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
.push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: PrescriptionsListPage(),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
.then((val) {
|
|
|
|
|
prescriptionsViewModel.setPrescriptionsDetailsLoading();
|
|
|
|
|
prescriptionsViewModel.getPrescriptionDetails(getPrescriptionRequestModel());
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
borderColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
textColor: AppColors.primaryRedColor,
|
|
|
|
|
fontSize: 14.f,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12.r,
|
|
|
|
|
height: 40.h,
|
|
|
|
|
icon: AppAssets.requests,
|
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
|
iconSize: 16.h,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
SizedBox(width: 16.w),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: CustomButton(
|
|
|
|
|
text: "All Prescriptions".needTranslation,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
.push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: PrescriptionsListPage(),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
.then((val) {
|
|
|
|
|
prescriptionsViewModel.setPrescriptionsDetailsLoading();
|
|
|
|
|
prescriptionsViewModel.getPrescriptionDetails(getPrescriptionRequestModel());
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
borderColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
textColor: AppColors.primaryRedColor,
|
|
|
|
|
fontSize: 14.f,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12.r,
|
|
|
|
|
height: 40.h,
|
|
|
|
|
icon: AppAssets.requests,
|
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
|
iconSize: 16.h,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 16.w),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: CustomButton(
|
|
|
|
|
text: "All Prescriptions".needTranslation,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
.push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: PrescriptionsListPage(),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
.then((val) {
|
|
|
|
|
prescriptionsViewModel.setPrescriptionsDetailsLoading();
|
|
|
|
|
prescriptionsViewModel.getPrescriptionDetails(getPrescriptionRequestModel());
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
borderColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
textColor: AppColors.primaryRedColor,
|
|
|
|
|
fontSize: 14.f,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12.r,
|
|
|
|
|
height: 40.h,
|
|
|
|
|
icon: AppAssets.requests,
|
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
|
iconSize: 16.h,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
|