|
|
|
@ -1,7 +1,6 @@
|
|
|
|
import 'dart:async';
|
|
|
|
import 'dart:async';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
import 'package:easy_localization/easy_localization.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/app_assets.dart';
|
|
|
|
@ -22,16 +21,15 @@ import 'package:hmg_patient_app_new/presentation/appointments/appointment_paymen
|
|
|
|
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart';
|
|
|
|
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_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/book_appointment/widgets/appointment_calendar.dart';
|
|
|
|
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
|
|
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_detail_page.dart';
|
|
|
|
import 'package:hmg_patient_app_new/presentation/prescriptions/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';
|
|
|
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/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';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.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';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart';
|
|
|
|
|
|
|
|
import 'package:maps_launcher/maps_launcher.dart';
|
|
|
|
import 'package:maps_launcher/maps_launcher.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
@ -170,15 +168,19 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
child: CustomButton(
|
|
|
|
child: CustomButton(
|
|
|
|
text: "Get Directions".needTranslation,
|
|
|
|
text: "Get Directions".needTranslation,
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
MapsLauncher.launchCoordinates(double.parse(widget.patientAppointmentHistoryResponseModel.latitude!),
|
|
|
|
MapsLauncher.launchCoordinates(
|
|
|
|
double.parse(widget.patientAppointmentHistoryResponseModel.longitude!), widget.patientAppointmentHistoryResponseModel.projectName);
|
|
|
|
double.parse(widget.patientAppointmentHistoryResponseModel.latitude!),
|
|
|
|
|
|
|
|
double.parse(widget.patientAppointmentHistoryResponseModel.longitude!),
|
|
|
|
|
|
|
|
widget.patientAppointmentHistoryResponseModel.projectName);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
backgroundColor: AppColors.textColor.withOpacity(0.8),
|
|
|
|
backgroundColor: AppColors.textColor.withOpacity(0.8),
|
|
|
|
borderColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction).withOpacity(0.01),
|
|
|
|
borderColor:
|
|
|
|
|
|
|
|
AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction)
|
|
|
|
|
|
|
|
.withOpacity(0.01),
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
fontSize: 14,
|
|
|
|
fontSize: 14.f,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
borderRadius: 12.h,
|
|
|
|
borderRadius: 12.r,
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
height: 40.h,
|
|
|
|
height: 40.h,
|
|
|
|
icon: AppAssets.directions_icon,
|
|
|
|
icon: AppAssets.directions_icon,
|
|
|
|
@ -235,7 +237,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
"Lab & Radiology".needTranslation.toText18(isBold: true),
|
|
|
|
"Lab & Radiology".needTranslation.toText18(isBold: true),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
GridView(
|
|
|
|
GridView(
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13.h, mainAxisSpacing: 13.h, childAspectRatio: 7 / 6),
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
|
|
|
|
crossAxisCount: 2, crossAxisSpacing: 13.h, mainAxisSpacing: 13.h, childAspectRatio: 7 / 6),
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
shrinkWrap: true,
|
|
|
|
shrinkWrap: true,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
@ -296,13 +299,17 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
SizedBox(width: 150.h, child: prescriptionVM.prescriptionDetailsList[index].itemDescription!.toText12(isBold: true, maxLine: 1)),
|
|
|
|
SizedBox(
|
|
|
|
|
|
|
|
width: 150.h,
|
|
|
|
|
|
|
|
child: prescriptionVM.prescriptionDetailsList[index].itemDescription!
|
|
|
|
|
|
|
|
.toText12(isBold: true, maxLine: 1)),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
width: 150.h,
|
|
|
|
width: 150.h,
|
|
|
|
child:
|
|
|
|
child:
|
|
|
|
"Prescribed By: ${widget.patientAppointmentHistoryResponseModel.doctorTitle} ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}"
|
|
|
|
"Prescribed By: ${widget.patientAppointmentHistoryResponseModel.doctorTitle} ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}"
|
|
|
|
.needTranslation
|
|
|
|
.needTranslation
|
|
|
|
.toText10(weight: FontWeight.w500, color: AppColors.greyTextColor, letterSpacing: -0.4),
|
|
|
|
.toText10(
|
|
|
|
|
|
|
|
weight: FontWeight.w500, color: AppColors.greyTextColor, letterSpacing: -0.4),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -415,7 +422,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
"Amount before tax".needTranslation.toText18(isBold: true),
|
|
|
|
"Amount before tax".needTranslation.toText18(isBold: true),
|
|
|
|
Utils.getPaymentAmountWithSymbol(widget.patientAppointmentHistoryResponseModel.patientShare!.toString().toText16(isBold: true), AppColors.blackColor, 13,
|
|
|
|
Utils.getPaymentAmountWithSymbol(
|
|
|
|
|
|
|
|
widget.patientAppointmentHistoryResponseModel.patientShare!.toString().toText16(isBold: true), AppColors.blackColor, 13,
|
|
|
|
isSaudiCurrency: true),
|
|
|
|
isSaudiCurrency: true),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -423,8 +431,12 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Expanded(child: LocaleKeys.upcomingPaymentNow.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor)),
|
|
|
|
Expanded(
|
|
|
|
"VAT 15%(${widget.patientAppointmentHistoryResponseModel.patientTaxAmount})".needTranslation.toText14(isBold: true, color: AppColors.greyTextColor, letterSpacing: -2),
|
|
|
|
child:
|
|
|
|
|
|
|
|
LocaleKeys.upcomingPaymentNow.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor)),
|
|
|
|
|
|
|
|
"VAT 15%(${widget.patientAppointmentHistoryResponseModel.patientTaxAmount})"
|
|
|
|
|
|
|
|
.needTranslation
|
|
|
|
|
|
|
|
.toText14(isBold: true, color: AppColors.greyTextColor, letterSpacing: -2),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 18.h),
|
|
|
|
SizedBox(height: 18.h),
|
|
|
|
@ -438,7 +450,10 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Utils.getPaymentAmountWithSymbol(widget.patientAppointmentHistoryResponseModel.patientShareWithTax!.toString().toText24(isBold: true), AppColors.blackColor, 17,
|
|
|
|
Utils.getPaymentAmountWithSymbol(
|
|
|
|
|
|
|
|
widget.patientAppointmentHistoryResponseModel.patientShareWithTax!.toString().toText24(isBold: true),
|
|
|
|
|
|
|
|
AppColors.blackColor,
|
|
|
|
|
|
|
|
17,
|
|
|
|
isSaudiCurrency: true),
|
|
|
|
isSaudiCurrency: true),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -543,9 +558,15 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
|
|
|
|
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
|
|
|
|
myAppointmentsViewModel.getPatientAppointments(true, false);
|
|
|
|
myAppointmentsViewModel.getPatientAppointments(true, false);
|
|
|
|
showCommonBottomSheet(context, child: Utils.getSuccessWidget(loadingText: "Appointment Confirmed Successfully".needTranslation), callBackFunc: (str) {
|
|
|
|
showCommonBottomSheet(context, child: Utils.getSuccessWidget(loadingText: "Appointment Confirmed Successfully".needTranslation),
|
|
|
|
|
|
|
|
callBackFunc: (str) {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
}, title: "", height: ResponsiveExtension.screenHeight * 0.3, isCloseButtonVisible: true, isDismissible: false, isFullScreen: false,
|
|
|
|
},
|
|
|
|
|
|
|
|
title: "",
|
|
|
|
|
|
|
|
height: ResponsiveExtension.screenHeight * 0.3,
|
|
|
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
|
|
|
isDismissible: false,
|
|
|
|
|
|
|
|
isFullScreen: false,
|
|
|
|
isSuccessDialog: true);
|
|
|
|
isSuccessDialog: true);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
// LoaderBottomSheet.hideLoader();
|
|
|
|
// LoaderBottomSheet.hideLoader();
|
|
|
|
|