|
|
|
|
@ -33,71 +33,30 @@ import 'package:smooth_corner/smooth_corner.dart';
|
|
|
|
|
class ImmediateLiveCarePaymentDetails extends StatelessWidget {
|
|
|
|
|
ImmediateLiveCarePaymentDetails({super.key});
|
|
|
|
|
|
|
|
|
|
late ImmediateLiveCareViewModel immediateLiveCareViewModel;
|
|
|
|
|
// late ImmediateLiveCareViewModel immediateLiveCareViewModel;
|
|
|
|
|
late AppState appState;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
immediateLiveCareViewModel = Provider.of<ImmediateLiveCareViewModel>(context, listen: false);
|
|
|
|
|
// immediateLiveCareViewModel = Provider.of<ImmediateLiveCareViewModel>(context, listen: false);
|
|
|
|
|
appState = getIt.get<AppState>();
|
|
|
|
|
return Scaffold(
|
|
|
|
|
backgroundColor: AppColors.scaffoldBgColor,
|
|
|
|
|
body: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: CollapsingListView(
|
|
|
|
|
title: LocaleKeys.reviewLiveCareRequest.tr(context: context),
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 24.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(height: 24.h),
|
|
|
|
|
LocaleKeys.patientInfo.tr(context: context).toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.h,
|
|
|
|
|
hasShadow: false,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Image.asset(
|
|
|
|
|
appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.maleImg : AppAssets.femaleImg,
|
|
|
|
|
width: 52.h,
|
|
|
|
|
height: 52.h,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 8.h),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
Wrap(
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
spacing: 3.h,
|
|
|
|
|
runSpacing: 4.h,
|
|
|
|
|
children: [
|
|
|
|
|
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} ${LocaleKeys.yearsOld.tr(context: context)}"),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
labelText:
|
|
|
|
|
"${LocaleKeys.clinic.tr()}: ${(appState.isArabic() ? immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceNameN : immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceName)!}"),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 24.h),
|
|
|
|
|
LocaleKeys.selectedLiveCareType.tr(context: context).toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Consumer<BookAppointmentsViewModel>(builder: (context, bookAppointmentsVM, child) {
|
|
|
|
|
return Container(
|
|
|
|
|
body: Consumer<ImmediateLiveCareViewModel>(builder: (context, immediateLiveCareVM, child) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: CollapsingListView(
|
|
|
|
|
title: LocaleKeys.reviewLiveCareRequest.tr(context: context),
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 24.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(height: 24.h),
|
|
|
|
|
LocaleKeys.patientInfo.tr(context: context).toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.h,
|
|
|
|
|
@ -106,217 +65,262 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
Image.asset(
|
|
|
|
|
appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.maleImg : AppAssets.femaleImg,
|
|
|
|
|
width: 52.h,
|
|
|
|
|
height: 52.h,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 8.h),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.livecare_clinic_icon, width: 32.h, height: 32.h, fit: BoxFit.contain),
|
|
|
|
|
SizedBox(width: 8.h),
|
|
|
|
|
getLiveCareType(context, immediateLiveCareViewModel.liveCareSelectedCallType).toText16(isBold: true),
|
|
|
|
|
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
Wrap(
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
spacing: 3.h,
|
|
|
|
|
runSpacing: 4.h,
|
|
|
|
|
children: [
|
|
|
|
|
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} ${LocaleKeys.yearsOld.tr(context: context)}"),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
labelText:
|
|
|
|
|
"${LocaleKeys.clinic.tr()}: ${(appState.isArabic() ? immediateLiveCareVM.immediateLiveCareSelectedClinic.serviceNameN : immediateLiveCareVM.immediateLiveCareSelectedClinic.serviceName)!}"),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.edit_icon, width: 24.h, height: 24.h, fit: BoxFit.contain),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(context, child: SelectLiveCareCallType(immediateLiveCareViewModel: immediateLiveCareViewModel), callBackFunc: () async {
|
|
|
|
|
debugPrint("Selected Call Type: ${immediateLiveCareViewModel.liveCareSelectedCallType}");
|
|
|
|
|
}, title: LocaleKeys.selectLiveCareCallType.tr(context: context), isCloseButtonVisible: true, isFullScreen: false);
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(height: 24.h)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 24.h),
|
|
|
|
|
LocaleKeys.selectedLiveCareType.tr(context: context).toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Consumer<BookAppointmentsViewModel>(builder: (context, bookAppointmentsVM, child) {
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.h,
|
|
|
|
|
hasShadow: false,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.livecare_clinic_icon, width: 32.h, height: 32.h, fit: BoxFit.contain),
|
|
|
|
|
SizedBox(width: 8.h),
|
|
|
|
|
getLiveCareType(context, immediateLiveCareVM.liveCareSelectedCallType).toText16(isBold: true),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.edit_icon, width: 24.h, height: 24.h, fit: BoxFit.contain),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(context, child: SelectLiveCareCallType(immediateLiveCareViewModel: immediateLiveCareVM), callBackFunc: () async {
|
|
|
|
|
debugPrint("Selected Call Type: ${immediateLiveCareVM.liveCareSelectedCallType}");
|
|
|
|
|
}, title: LocaleKeys.selectLiveCareCallType.tr(context: context), isCloseButtonVisible: true, isFullScreen: false);
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(height: 24.h)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.h,
|
|
|
|
|
hasShadow: false,
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.isCash ?? true)
|
|
|
|
|
? Container(
|
|
|
|
|
height: 50.h,
|
|
|
|
|
decoration: ShapeDecoration(
|
|
|
|
|
color: AppColors.secondaryLightRedBorderColor,
|
|
|
|
|
shape: SmoothRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24)),
|
|
|
|
|
smoothness: 1,
|
|
|
|
|
Container(
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24.h,
|
|
|
|
|
hasShadow: false,
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.isCash ?? true)
|
|
|
|
|
? Container(
|
|
|
|
|
height: 50.h,
|
|
|
|
|
decoration: ShapeDecoration(
|
|
|
|
|
color: AppColors.secondaryLightRedBorderColor,
|
|
|
|
|
shape: SmoothRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24)),
|
|
|
|
|
smoothness: 1,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: LocaleKeys.updateInsurance.tr(context: context),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: InsuranceHomePage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.primaryRedColor,
|
|
|
|
|
borderColor: AppColors.secondaryLightRedBorderColor,
|
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 8,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(15, 0, 15, 0),
|
|
|
|
|
height: 30.h,
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: const SizedBox(),
|
|
|
|
|
SizedBox(height: 24.h),
|
|
|
|
|
LocaleKeys.totalAmountToPay.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
SizedBox(height: 17.h),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
|
|
|
|
|
Utils.getPaymentAmountWithSymbol(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.amount!.toText16(isBold: true), AppColors.blackColor, 13,
|
|
|
|
|
isSaudiCurrency: immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar"),
|
|
|
|
|
],
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor),
|
|
|
|
|
Utils.getPaymentAmountWithSymbol(
|
|
|
|
|
immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.tax!.toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13,
|
|
|
|
|
isSaudiCurrency: immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar"),
|
|
|
|
|
],
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
SizedBox(height: 17.h),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(width: 150.h, child: Utils.getPaymentMethods()),
|
|
|
|
|
Utils.getPaymentAmountWithSymbol(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total!.toText24(isBold: true), AppColors.blackColor, 17,
|
|
|
|
|
isSaudiCurrency: immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar"),
|
|
|
|
|
],
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total == "0" || immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total == "0.0")
|
|
|
|
|
? CustomButton(
|
|
|
|
|
text: LocaleKeys.confirmLiveCare.tr(context: context),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await askVideoCallPermission(context).then((val) async {
|
|
|
|
|
if (val) {
|
|
|
|
|
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.confirmingLiveCareRequest.tr(context: context));
|
|
|
|
|
|
|
|
|
|
await immediateLiveCareViewModel.addNewCallRequestForImmediateLiveCare("${appState.getAuthenticatedUser()!.patientId}${DateTime.now().millisecondsSinceEpoch}");
|
|
|
|
|
await immediateLiveCareViewModel.getPatientLiveCareHistory();
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
if (immediateLiveCareViewModel.patientHasPendingLiveCareRequest) {
|
|
|
|
|
Navigator.pushAndRemoveUntil(
|
|
|
|
|
context,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: LocaleKeys.updateInsurance.tr(context: context),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: LandingNavigation(),
|
|
|
|
|
page: InsuranceHomePage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.primaryRedColor,
|
|
|
|
|
borderColor: AppColors.secondaryLightRedBorderColor,
|
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 8,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(15, 0, 15, 0),
|
|
|
|
|
height: 30.h,
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: const SizedBox(),
|
|
|
|
|
SizedBox(height: 24.h),
|
|
|
|
|
LocaleKeys.totalAmountToPay.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
SizedBox(height: 17.h),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
|
|
|
|
|
Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.amount!.toText16(isBold: true), AppColors.blackColor, 13,
|
|
|
|
|
isSaudiCurrency: immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar"),
|
|
|
|
|
],
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor),
|
|
|
|
|
Utils.getPaymentAmountWithSymbol(
|
|
|
|
|
immediateLiveCareVM.liveCareImmediateAppointmentFeesList.tax!.toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13,
|
|
|
|
|
isSaudiCurrency: immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar"),
|
|
|
|
|
],
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
SizedBox(height: 17.h),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(width: 150.h, child: Utils.getPaymentMethods()),
|
|
|
|
|
Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.total!.toText24(isBold: true), AppColors.blackColor, 17,
|
|
|
|
|
isSaudiCurrency: immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar"),
|
|
|
|
|
],
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.total == "0" || immediateLiveCareVM.liveCareImmediateAppointmentFeesList.total == "0.0")
|
|
|
|
|
? CustomButton(
|
|
|
|
|
text: LocaleKeys.confirmLiveCare.tr(context: context),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await askVideoCallPermission(context).then((val) async {
|
|
|
|
|
if (val) {
|
|
|
|
|
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.confirmingLiveCareRequest.tr(context: context));
|
|
|
|
|
|
|
|
|
|
await immediateLiveCareVM.addNewCallRequestForImmediateLiveCare("${appState.getAuthenticatedUser()!.patientId}${DateTime
|
|
|
|
|
.now()
|
|
|
|
|
.millisecondsSinceEpoch}");
|
|
|
|
|
await immediateLiveCareVM.getPatientLiveCareHistory();
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
if (immediateLiveCareVM.patientHasPendingLiveCareRequest) {
|
|
|
|
|
Navigator.pushAndRemoveUntil(
|
|
|
|
|
context,
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: LandingNavigation(),
|
|
|
|
|
),
|
|
|
|
|
(r) => false);
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: ImmediateLiveCarePendingRequestPage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: ImmediateLiveCarePendingRequestPage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
child: Utils.getErrorWidget(loadingText: LocaleKeys.unknownErrorOccurred.tr(context: context)),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
title: LocaleKeys.notice.tr(context: context),
|
|
|
|
|
context,
|
|
|
|
|
child: Utils.getErrorWidget(loadingText: LocaleKeys.unknownErrorOccurred.tr(context: context)),
|
|
|
|
|
child: Utils.getWarningWidget(
|
|
|
|
|
loadingText: LocaleKeys.liveCarePermissionsMessage.tr(context: context),
|
|
|
|
|
isShowActionButtons: true,
|
|
|
|
|
onCancelTap: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
onConfirmTap: () async {
|
|
|
|
|
openAppSettings();
|
|
|
|
|
}),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
title: LocaleKeys.notice.tr(context: context),
|
|
|
|
|
context,
|
|
|
|
|
child: Utils.getWarningWidget(
|
|
|
|
|
loadingText: LocaleKeys.liveCarePermissionsMessage.tr(context: context),
|
|
|
|
|
isShowActionButtons: true,
|
|
|
|
|
onCancelTap: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
onConfirmTap: () async {
|
|
|
|
|
openAppSettings();
|
|
|
|
|
}),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.successColor,
|
|
|
|
|
borderColor: AppColors.successColor,
|
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
|
height: 50.h,
|
|
|
|
|
icon: AppAssets.livecare_book_icon,
|
|
|
|
|
iconColor: AppColors.whiteColor,
|
|
|
|
|
iconSize: 18.h,
|
|
|
|
|
).paddingSymmetrical(24.h, 24.h)
|
|
|
|
|
: CustomButton(
|
|
|
|
|
text: LocaleKeys.payNow.tr(context: context),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await askVideoCallPermission(context).then((val) {
|
|
|
|
|
if (val) {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: ImmediateLiveCarePaymentPage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
// else {
|
|
|
|
|
// showCommonBottomSheetWithoutHeight(
|
|
|
|
|
// title: LocaleKeys.notice.tr(context: context),
|
|
|
|
|
// context,
|
|
|
|
|
// child: Utils.getWarningWidget(
|
|
|
|
|
// loadingText: LocaleKeys.liveCarePermissionsMessage.tr(context: context),
|
|
|
|
|
// isShowActionButtons: true,
|
|
|
|
|
// onCancelTap: () {
|
|
|
|
|
// Navigator.pop(context);
|
|
|
|
|
// },
|
|
|
|
|
// onConfirmTap: () async {
|
|
|
|
|
// openAppSettings();
|
|
|
|
|
// }),
|
|
|
|
|
// callBackFunc: () {},
|
|
|
|
|
// isFullScreen: false,
|
|
|
|
|
// isCloseButtonVisible: true,
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.infoColor,
|
|
|
|
|
borderColor: AppColors.infoColor,
|
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
|
height: 50.h,
|
|
|
|
|
icon: AppAssets.appointment_pay_icon,
|
|
|
|
|
iconColor: AppColors.whiteColor,
|
|
|
|
|
iconSize: 18.h,
|
|
|
|
|
).paddingSymmetrical(24.h, 24.h),
|
|
|
|
|
],
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.successColor,
|
|
|
|
|
borderColor: AppColors.successColor,
|
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
|
height: 50.h,
|
|
|
|
|
icon: AppAssets.livecare_book_icon,
|
|
|
|
|
iconColor: AppColors.whiteColor,
|
|
|
|
|
iconSize: 18.h,
|
|
|
|
|
).paddingSymmetrical(24.h, 24.h)
|
|
|
|
|
: CustomButton(
|
|
|
|
|
text: LocaleKeys.payNow.tr(context: context),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await askVideoCallPermission(context).then((val) {
|
|
|
|
|
if (val) {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: ImmediateLiveCarePaymentPage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
// else {
|
|
|
|
|
// showCommonBottomSheetWithoutHeight(
|
|
|
|
|
// title: LocaleKeys.notice.tr(context: context),
|
|
|
|
|
// context,
|
|
|
|
|
// child: Utils.getWarningWidget(
|
|
|
|
|
// loadingText: LocaleKeys.liveCarePermissionsMessage.tr(context: context),
|
|
|
|
|
// isShowActionButtons: true,
|
|
|
|
|
// onCancelTap: () {
|
|
|
|
|
// Navigator.pop(context);
|
|
|
|
|
// },
|
|
|
|
|
// onConfirmTap: () async {
|
|
|
|
|
// openAppSettings();
|
|
|
|
|
// }),
|
|
|
|
|
// callBackFunc: () {},
|
|
|
|
|
// isFullScreen: false,
|
|
|
|
|
// isCloseButtonVisible: true,
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.infoColor,
|
|
|
|
|
borderColor: AppColors.infoColor,
|
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
|
height: 50.h,
|
|
|
|
|
icon: AppAssets.appointment_pay_icon,
|
|
|
|
|
iconColor: AppColors.whiteColor,
|
|
|
|
|
iconSize: 18.h,
|
|
|
|
|
).paddingSymmetrical(24.h, 24.h),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|