Update: 2026-06-11 18:22:57

This commit is contained in:
Hamza-Ayed
2026-06-11 18:22:59 +03:00
parent c5170a88d2
commit 727068b668
629 changed files with 46050 additions and 46109 deletions

View File

@@ -1,3 +1,4 @@
import 'package:siro_driver/constant/currency.dart';
import 'dart:convert';
import 'package:flutter/material.dart';
@@ -17,6 +18,7 @@ import '../../../main.dart';
import '../../../print.dart';
import '../../widgets/elevated_btn.dart';
import '../../widgets/my_textField.dart';
import '../../widgets/mydialoug.dart';
import 'ecash.dart';
class PointsCaptain extends StatelessWidget {
@@ -77,7 +79,7 @@ class PointsCaptain extends StatelessWidget {
),
const SizedBox(height: 10),
Text(
'$countPoint ${'SYP'.tr}',
'$countPoint ${CurrencyHelper.currency}',
style: TextStyle(
fontWeight: FontWeight.w900,
fontSize: 15,
@@ -86,7 +88,7 @@ class PointsCaptain extends StatelessWidget {
),
const SizedBox(height: 4),
Text(
'${'Price:'.tr} ${pricePoint.toStringAsFixed(0)} ${'SYP'.tr}',
'${'Price:'.tr} ${pricePoint.toStringAsFixed(0)} ${CurrencyHelper.currency}',
style: TextStyle(
fontSize: 11,
color: Colors.grey.shade600,
@@ -130,47 +132,93 @@ class PointsCaptain extends StatelessWidget {
],
),
const SizedBox(height: 8),
Text("${'Amount to charge:'.tr} $countPoint ${'SYP'.tr}",
Text(
"${'Amount to charge:'.tr} $countPoint ${CurrencyHelper.currency}",
style: FinanceDesignSystem.subHeadingStyle),
const SizedBox(height: 24),
_buildPaymentMethodTile(
icon: Icons.credit_card_rounded,
title: 'Debit Card'.tr,
subtitle: 'E-Cash payment gateway'.tr,
color: Colors.blue,
onTap: () {
Get.back();
payWithEcashDriver(context, pricePoint.toString());
},
),
const SizedBox(height: 16),
_buildPaymentMethodTile(
image: 'assets/images/syriatel.jpeg',
title: 'Syriatel Cash'.tr,
subtitle: 'Pay using Syriatel mobile wallet'.tr,
color: Colors.red,
onTap: () => _showPhoneInputDialog(context, 'Syriatel'),
),
const SizedBox(height: 16),
_buildPaymentMethodTile(
image: 'assets/images/shamCash.png',
title: 'Sham Cash'.tr,
subtitle: 'Pay using Sham Cash wallet'.tr,
color: Colors.orange,
onTap: () async {
Get.back();
bool isAuthSupported =
await LocalAuthentication().isDeviceSupported();
if (isAuthSupported) {
bool didAuthenticate =
await LocalAuthentication().authenticate(
localizedReason: 'Confirm payment with biometrics'.tr,
);
if (!didAuthenticate) return;
}
Get.to(() => PaymentScreenSmsProvider(amount: pricePoint));
},
),
if (box.read(BoxName.countryCode) == 'Syria') ...[
_buildPaymentMethodTile(
icon: Icons.credit_card_rounded,
title: 'Debit Card'.tr,
subtitle: 'E-Cash payment gateway'.tr,
color: Colors.blue,
onTap: () {
Get.back();
payWithEcashDriver(context, pricePoint.toString());
},
),
const SizedBox(height: 16),
_buildPaymentMethodTile(
image: 'assets/images/syriatel.jpeg',
title: 'Syriatel Cash'.tr,
subtitle: 'Pay using Syriatel mobile wallet'.tr,
color: Colors.red,
onTap: () => _showPhoneInputDialog(context, 'Syriatel'),
),
const SizedBox(height: 16),
_buildPaymentMethodTile(
image: 'assets/images/shamCash.png',
title: 'Sham Cash'.tr,
subtitle: 'Pay using Sham Cash wallet'.tr,
color: Colors.orange,
onTap: () async {
Get.back();
bool isAuthSupported =
await LocalAuthentication().isDeviceSupported();
if (isAuthSupported) {
bool didAuthenticate =
await LocalAuthentication().authenticate(
localizedReason: 'Confirm payment with biometrics'.tr,
);
if (!didAuthenticate) return;
}
Get.to(() => PaymentScreenSmsProvider(amount: pricePoint));
},
),
const SizedBox(height: 16),
_buildPaymentMethodTile(
image: 'assets/images/cashMTN.png',
title: 'MTN Cash'.tr,
subtitle: 'Pay using MTN Cash wallet'.tr,
color: Colors.yellow.shade700,
onTap: () => _showPhoneInputDialog(context, 'MTN'),
),
],
if (box.read(BoxName.countryCode) == 'Jordan') ...[
_buildPaymentMethodTile(
icon: Icons.qr_code_scanner_rounded,
title: 'CliQ'.tr,
subtitle: 'Pay via CliQ (Alias: siroapp)'.tr,
color: Colors.purple,
onTap: () {
Get.back();
MyDialog().getDialog(
'CliQ Payment'.tr,
'Please transfer the amount to alias: siroapp'.tr,
() => Get.back());
},
),
],
if (box.read(BoxName.countryCode) == 'Egypt') ...[
_buildPaymentMethodTile(
icon: Icons.account_balance_wallet_rounded,
title: 'Wallet Payment'.tr,
subtitle: 'Mobile Wallets'.tr,
color: Colors.red,
onTap: () => _showPhoneInputDialog(context, 'PaymobWallet'),
),
const SizedBox(height: 16),
_buildPaymentMethodTile(
icon: Icons.credit_card_rounded,
title: 'Bank Card Payment'.tr,
subtitle: 'Card Payment'.tr,
color: Colors.blue,
onTap: () {
Get.back();
// Navigate to Paymob card payment
},
),
],
],
),
),
@@ -267,9 +315,10 @@ class PointsCaptain extends StatelessWidget {
paymentController.walletphoneController.text);
if (provider == 'Syriatel') {
await payWithSyriaTelWallet(
context, pricePoint.toString(), 'SYP');
context, pricePoint.toString(), CurrencyHelper.currency);
} else {
await payWithMTNWallet(context, pricePoint.toString(), 'SYP');
await payWithMTNWallet(
context, pricePoint.toString(), CurrencyHelper.currency);
}
}
},