import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:ride/constant/style.dart'; import 'package:ride/controller/home/payment/payment_controller.dart'; import 'package:ride/views/widgets/elevated_btn.dart'; import '../../../constant/colors.dart'; import '../../../controller/home/map_page_controller.dart'; class CashConfirmPageShown extends StatelessWidget { const CashConfirmPageShown({ super.key, }); @override Widget build(BuildContext context) { return GetBuilder( builder: (controller) => Positioned( right: 5, bottom: 5, left: 5, child: AnimatedContainer( duration: const Duration(milliseconds: 400), height: controller.isCashConfirmPageShown ? controller.cashConfirmPageShown : 0, decoration: BoxDecoration( color: AppColor.secondaryColor, borderRadius: BorderRadius.circular(15)), child: Padding( padding: const EdgeInsets.symmetric(horizontal: 20), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( 'Payment Method'.tr, style: AppStyle.title.copyWith(fontSize: 22), ), IconButton( onPressed: () => controller.changeCashConfirmPageShown(), icon: const Icon(Icons.close), ), ], ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ const Icon( Icons.wallet_outlined, size: 25, color: AppColor.redColor, ), const SizedBox( width: 20, ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( 'Ride Wallet'.tr, style: AppStyle.title, ), Text( '${'Your Wallet balance is '.tr}JD 0.00', style: AppStyle.subtitle, ), ], ), const Spacer(), Checkbox.adaptive( value: false, onChanged: (value) {}, ) ], ), const Divider( color: AppColor.accentColor, thickness: 1, height: 2, indent: 1, ), Row( children: [ Icon( Icons.monetization_on, color: Colors.green[400], ), const SizedBox( width: 20, ), InkWell( onTap: () => controller.changeCashConfirmPageShown(), child: Text( 'CASH', style: AppStyle.title, ), ), const Spacer(), Checkbox.adaptive( value: false, onChanged: (value) {}, ) ], ), const Divider( color: AppColor.accentColor, thickness: 1, height: 2, indent: 1, ), MyElevatedButton( title: 'Add Payment Method'.tr, onPressed: () { controller.changePaymentMethodPageShown(); CreditCardController().openPayment(); }) ], ), ), ), )); } }