12/12/1
This commit is contained in:
@@ -32,16 +32,32 @@ class WaletCaptain extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Card(
|
||||
elevation: 4,
|
||||
const SizedBox(),
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration.copyWith(
|
||||
color: double.parse(
|
||||
captainWalletController.totalPoints) <
|
||||
100
|
||||
? AppColor.redColor
|
||||
: AppColor.greenColor,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
child: Text(
|
||||
'Total Points is ${captainWalletController.totalPoints} 💎',
|
||||
'Total Points is ${captainWalletController.totalPoints.toString()} 💎',
|
||||
style: AppStyle.headtitle2,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
double.parse(captainWalletController.totalPoints
|
||||
.toString()) <
|
||||
100
|
||||
? MyElevatedButton(
|
||||
title: 'Charge your Account', onPressed: () {})
|
||||
: const SizedBox(),
|
||||
Card(
|
||||
elevation: 4,
|
||||
child: Padding(
|
||||
@@ -93,30 +109,39 @@ class WaletCaptain extends StatelessWidget {
|
||||
const SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
title: 'Create Wallet to recive your money',
|
||||
onPressed: () async {
|
||||
PaymentController paymentController =
|
||||
Get.find<PaymentController>();
|
||||
paymentController.createConnectAccount();
|
||||
}),
|
||||
],
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
PaymentController paymentController =
|
||||
Get.put(PaymentController());
|
||||
await paymentController.createTransactionToCaptain(
|
||||
'1000',
|
||||
box.read(BoxName.accountIdStripeConnect));
|
||||
},
|
||||
child: const Text(
|
||||
"Pay to Captain",
|
||||
),
|
||||
)
|
||||
box
|
||||
.read(BoxName.accountIdStripeConnect)
|
||||
.toString()
|
||||
.isEmpty
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
title:
|
||||
'Create Wallet to recive your money',
|
||||
onPressed: () async {
|
||||
PaymentController paymentController =
|
||||
Get.find<PaymentController>();
|
||||
paymentController
|
||||
.createConnectAccount();
|
||||
}),
|
||||
],
|
||||
)
|
||||
: const SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// PaymentController paymentController =
|
||||
// Get.put(PaymentController());
|
||||
// await paymentController.createTransactionToCaptain(
|
||||
// '1000',
|
||||
// box.read(BoxName.accountIdStripeConnect));
|
||||
// },
|
||||
// child: const Text(
|
||||
// "Pay to Captain",
|
||||
// ),
|
||||
// )
|
||||
],
|
||||
),
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user