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

@@ -288,7 +288,13 @@ class MyDropDownSyria extends StatelessWidget {
onChanged: (String? newValue) {
controller.changeValue(newValue);
},
items: <String>['Syriatel', 'Cash Mobile', 'Sham Cash']
items: (box.read(BoxName.countryCode) == 'Syria'
? <String>['Syriatel', 'MTN Cash', 'Sham Cash']
: box.read(BoxName.countryCode) == 'Egypt'
? <String>['Wallet Payment', 'Bank Card Payment']
: box.read(BoxName.countryCode) == 'Jordan'
? <String>['CliQ']
: <String>['Bank Transfer', 'Mobile Wallet'])
.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
@@ -302,7 +308,13 @@ class MyDropDownSyria extends StatelessWidget {
// هذا المتحكم ضروري لعمل القائمة المنسدلة
class SyrianPayoutController extends GetxController {
String dropdownValue = 'Syriatel';
String dropdownValue = box.read(BoxName.countryCode) == 'Syria'
? 'Syriatel'
: box.read(BoxName.countryCode) == 'Egypt'
? 'Wallet Payment'
: box.read(BoxName.countryCode) == 'Jordan'
? 'CliQ'
: 'Bank Transfer';
void changeValue(String? newValue) {
if (newValue != null) {

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);
}
}
},

View File

@@ -1,3 +1,4 @@
import 'package:siro_driver/constant/currency.dart';
import 'package:local_auth/local_auth.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -171,7 +172,7 @@ class WalletCaptainRefactored extends StatelessWidget {
?['morning_count'] ??
0,
targetProgress: 5,
reward: "+50 SYP",
reward: "+50 ${CurrencyHelper.currency}",
onTap: () =>
controller.addDriverWalletFromPromo('Morning Promo', 50),
),
@@ -183,7 +184,7 @@ class WalletCaptainRefactored extends StatelessWidget {
?['afternoon_count'] ??
0,
targetProgress: 5,
reward: "+50 SYP",
reward: "+50 ${CurrencyHelper.currency}",
onTap: () => controller.addDriverWalletFromPromo(
'Afternoon Promo', 50),
),
@@ -408,7 +409,13 @@ Future<dynamic> addSyrianPaymentMethod(
}
class SyrianPayoutController extends GetxController {
String dropdownValue = 'syriatel';
String dropdownValue = box.read(BoxName.countryCode) == 'Syria'
? 'syriatel'
: box.read(BoxName.countryCode) == 'Egypt'
? 'wallet payment'
: box.read(BoxName.countryCode) == 'Jordan'
? 'cliq'
: 'bank transfer';
void changeValue(String? newValue) {
if (newValue != null) {
dropdownValue = newValue;
@@ -433,7 +440,13 @@ class MyDropDownSyria extends StatelessWidget {
style: TextStyle(color: theme.textTheme.bodyLarge?.color),
underline: Container(height: 2, color: theme.primaryColor),
onChanged: (String? newValue) => controller.changeValue(newValue),
items: <String>['syriatel', 'mtn']
items: (box.read(BoxName.countryCode) == 'Syria'
? <String>['syriatel', 'mtn cash', 'sham cash']
: box.read(BoxName.countryCode) == 'Egypt'
? <String>['wallet payment', 'bank card payment']
: box.read(BoxName.countryCode) == 'Jordan'
? <String>['cliq']
: <String>['bank transfer', 'wallet'])
.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(value: value, child: Text(value.tr));
}).toList(),

View File

@@ -1,3 +1,4 @@
import 'package:siro_driver/constant/currency.dart';
import 'package:flutter/material.dart';
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
import 'package:get/get.dart';
@@ -127,7 +128,7 @@ class WeeklyPaymentPage extends StatelessWidget {
style: TextStyle(
color: Colors.white.withValues(alpha: 0.8), fontSize: 14)),
const SizedBox(height: 8),
Text('${earnings.toStringAsFixed(0)} SYP',
Text('${earnings.toStringAsFixed(0)} ${CurrencyHelper.currency}',
style: const TextStyle(
color: Colors.white,
fontSize: 36,

View File

@@ -1,3 +1,4 @@
import 'package:siro_driver/constant/currency.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../../constant/finance_design_system.dart';
@@ -88,7 +89,7 @@ class BalanceCard extends StatelessWidget {
),
const SizedBox(width: 8),
Text(
"SYP".tr,
CurrencyHelper.currency,
style: TextStyle(
color: Colors.white.withOpacity(0.7),
fontSize: 18,

View File

@@ -1,3 +1,4 @@
import 'package:siro_driver/constant/currency.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../../constant/finance_design_system.dart';
@@ -92,7 +93,7 @@ class FinancialSummaryCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
"${item.amount} ${'SYP'.tr}",
"${item.amount} ${CurrencyHelper.currency}",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,

View File

@@ -1,3 +1,4 @@
import 'package:siro_driver/constant/currency.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../../constant/finance_design_system.dart';
@@ -103,7 +104,7 @@ class TransactionPreviewItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
"${isCredit ? '+' : '-'}$amount ${'SYP'.tr}",
"${isCredit ? '+' : '-'}$amount ${CurrencyHelper.currency}",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,