You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.6 KiB
Dart
54 lines
1.6 KiB
Dart
|
1 month ago
|
import 'package:flutter/material.dart';
|
||
|
|
import 'package:get/get.dart';
|
||
|
|
|
||
|
|
import '../../../core/constants/app_assets.dart';
|
||
|
|
import '../../../res/app_colors.dart';
|
||
|
|
|
||
|
|
|
||
|
|
class PaymentMethodController extends GetxController {
|
||
|
|
List<PaymentMethod> paymentList = [
|
||
|
|
PaymentMethod(
|
||
|
|
title: "Debit Card",
|
||
|
|
image: AppAssets.ic_debit_card,
|
||
|
|
content:
|
||
|
|
"10.78 GBP fee, so recipient gets 340839.71 PKR. Should arrive in seconds",
|
||
|
|
icon: const Icon(Icons.arrow_forward_ios_outlined,
|
||
|
|
size: 15, color: AppColors.colorGrey600)),
|
||
|
|
PaymentMethod(
|
||
|
|
title: "Credit Card",
|
||
|
|
image: AppAssets.ic_debit_card,
|
||
|
|
content:
|
||
|
|
"10.78 GBP fee, so recipient gets 340839.71 PKR. Should arrive in seconds",
|
||
|
|
icon: const Icon(Icons.arrow_forward_ios_outlined,
|
||
|
|
size: 15, color: AppColors.colorGrey600)),
|
||
|
|
PaymentMethod(
|
||
|
|
title: "Bank Transfer",
|
||
|
|
image: AppAssets.ic_bank,
|
||
|
|
content:
|
||
|
|
"6.63 GBP fee, so recipient gets 342269.61 PKR. Should arrive in seconds",
|
||
|
|
icon: const Icon(Icons.arrow_forward_ios_outlined,
|
||
|
|
size: 15, color: AppColors.colorGrey600)),
|
||
|
|
];
|
||
|
|
|
||
|
|
Rx<PaymentMethod> paymentMethod = Rx(
|
||
|
|
PaymentMethod(image: "", title: "", content: "", icon: Icon(Icons.abc)));
|
||
|
|
|
||
|
|
updatePaymentMethod(PaymentMethod p) {
|
||
|
|
paymentMethod.value = p;
|
||
|
|
Get.back();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
class PaymentMethod {
|
||
|
|
String title;
|
||
|
|
String content;
|
||
|
|
Icon icon;
|
||
|
|
String image;
|
||
|
|
|
||
|
|
PaymentMethod(
|
||
|
|
{required this.image,
|
||
|
|
required this.title,
|
||
|
|
required this.content,
|
||
|
|
required this.icon});
|
||
|
|
}
|