12/3/1
This commit is contained in:
@@ -2,17 +2,20 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/box_name.dart';
|
||||
import 'package:ride/constant/style.dart';
|
||||
import 'package:ride/views/home/my_wallet/passenger_wallet.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../controller/home/map_passenger_controller.dart';
|
||||
import '../../../controller/payment/payment_controller.dart';
|
||||
import '../../../main.dart';
|
||||
import '../../widgets/elevated_btn.dart';
|
||||
import '../my_wallet/passenger_wallet_dialoge.dart';
|
||||
|
||||
class CashConfirmPageShown extends StatelessWidget {
|
||||
const CashConfirmPageShown({
|
||||
CashConfirmPageShown({
|
||||
super.key,
|
||||
});
|
||||
|
||||
PaymentController paymentController = Get.put(PaymentController());
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<MapPassengerController>(
|
||||
@@ -39,11 +42,11 @@ class CashConfirmPageShown extends StatelessWidget {
|
||||
'Payment Method'.tr,
|
||||
style: AppStyle.title.copyWith(fontSize: 22),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () =>
|
||||
controller.changeCashConfirmPageShown(),
|
||||
icon: const Icon(Icons.close),
|
||||
),
|
||||
// IconButton(
|
||||
// onPressed: () =>
|
||||
// controller.changeCashConfirmPageShown(),
|
||||
// icon: const Icon(Icons.close),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
GetBuilder<PaymentController>(
|
||||
@@ -123,16 +126,38 @@ class CashConfirmPageShown extends StatelessWidget {
|
||||
height: 2,
|
||||
indent: 1,
|
||||
),
|
||||
// controller.cardNumber == null ||
|
||||
// controller.cardNumber!.isEmpty
|
||||
// ? MyElevatedButton(
|
||||
// title: 'Add Payment Method'.tr,
|
||||
// onPressed: () {
|
||||
// controller.changePaymentMethodPageShown();
|
||||
// CreditCardController().openPayment();
|
||||
// },
|
||||
// )
|
||||
// : const SizedBox()
|
||||
// GetBuilder<PaymentController>(
|
||||
// builder: (paymentController) =>
|
||||
// (paymentController.isWalletChecked == false &&
|
||||
// paymentController.isCashChecked == true
|
||||
// ? MyElevatedButton(
|
||||
// title: 'Next'.tr,
|
||||
// onPressed: () {
|
||||
// controller.changeCashConfirmPageShown();
|
||||
// },
|
||||
// )
|
||||
// : const SizedBox())),
|
||||
GetBuilder<PaymentController>(
|
||||
builder: (paymentController) => (box
|
||||
.read(BoxName.passengerWalletTotal) ==
|
||||
null ||
|
||||
double.parse(box
|
||||
.read(BoxName.passengerWalletTotal)) <
|
||||
controller.totalPassenger)
|
||||
? MyElevatedButton(
|
||||
title: 'To use Wallet charge it'.tr,
|
||||
onPressed: () {
|
||||
Get.to(() => const PassengerWallet());
|
||||
},
|
||||
kolor: AppColor.redColor,
|
||||
)
|
||||
: MyElevatedButton(
|
||||
title: 'Next'.tr,
|
||||
onPressed: () {
|
||||
controller.changeCashConfirmPageShown();
|
||||
},
|
||||
), // Add a fallback widget if none of the conditions are met
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user