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 'package:siro_driver/controller/home/captin/map_driver_controller.dart';
import 'package:siro_driver/views/widgets/my_textField.dart';
import 'package:flutter/material.dart';
@@ -113,7 +114,7 @@ class RatePassenger extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
'SYP'.tr, // Replace with your local currency symbol if needed
CurrencyHelper.currency, // Replace with your local currency symbol if needed
style: TextStyle(
color: Colors.white.withOpacity(0.8),
fontSize: 24,

View File

@@ -10,6 +10,9 @@ import '../../../constant/colors.dart';
import '../../../controller/auth/captin/phone_helper_controller.dart';
import '../../../controller/local/phone_intel/intl_phone_field.dart';
import '../../../print.dart';
import '../../../constant/box_name.dart';
import '../../../main.dart';
import '../../../controller/functions/country_logic.dart';
// Assuming you have an AppColor class defined in your project.
// import 'path/to/your/app_color.dart';
@@ -348,7 +351,7 @@ class _PhoneNumberScreenState extends State<PhoneNumberScreen> {
const BorderSide(color: AppColor.greenColor, width: 2),
),
),
initialCountryCode: 'SY',
initialCountryCode: CountryLogic.getCountryPrefix(box.read(BoxName.countryCode) ?? 'Syria'),
onChanged: (phone) {
_completePhone = phone.completeNumber;
},

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';
@@ -244,7 +245,7 @@ class LeaderboardPage extends StatelessWidget {
// Value
Text(
isEarnings
? '${e.value.toStringAsFixed(0)} ${'SYP'.tr}'
? '${e.value.toStringAsFixed(0)} ${CurrencyHelper.currency}'
: '${e.value.toInt()} ${'Rides'.tr}',
style: TextStyle(
fontSize: 13,

View File

@@ -1,3 +1,4 @@
import 'package:siro_driver/constant/currency.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:intl/intl.dart';
@@ -314,7 +315,7 @@ class _TripHistoryCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
'${trip['price']} ${'SYP'.tr}',
'${trip['price']} ${CurrencyHelper.currency}',
style: TextStyle(
fontWeight: FontWeight.w900,
fontSize: 16,

View File

@@ -1,3 +1,4 @@
import 'package:siro_driver/constant/currency.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:intl/intl.dart';
@@ -70,7 +71,7 @@ Widget driverEndRideBar() {
value: NumberFormat('#,##0').format(
double.tryParse(controller.price.toString()) ?? 0,
),
unit: 'SYP'.tr,
unit: CurrencyHelper.currency,
label: isFixed ? 'Fixed Price'.tr : 'Meter Fare'.tr,
isHighlight: true,
isFixedStyle: isFixed,

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,

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';
@@ -115,7 +116,7 @@ class DailyGoalWidget extends StatelessWidget {
),
const SizedBox(width: 6),
Text(
'/ ${controller.dailyGoal.toStringAsFixed(0)} ${'SYP'.tr}',
'/ ${controller.dailyGoal.toStringAsFixed(0)} ${CurrencyHelper.currency}',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
@@ -205,7 +206,7 @@ class DailyGoalWidget extends StatelessWidget {
)
else
Text(
'${'Remaining:'.tr} ${(controller.dailyGoal - controller.dailyEarnings).clamp(0, double.infinity).toStringAsFixed(0)} ${'SYP'.tr}',
'${'Remaining:'.tr} ${(controller.dailyGoal - controller.dailyEarnings).clamp(0, double.infinity).toStringAsFixed(0)} ${CurrencyHelper.currency}',
style: TextStyle(
fontSize: 11,
color: FinanceDesignSystem.textSecondary,
@@ -248,7 +249,7 @@ class DailyGoalWidget extends StatelessWidget {
),
decoration: InputDecoration(
hintText: '5000',
suffixText: 'SYP'.tr,
suffixText: CurrencyHelper.currency,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(color: FinanceDesignSystem.borderColor),

View File

@@ -1,3 +1,4 @@
import 'package:siro_driver/constant/currency.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:fl_chart/fl_chart.dart';
@@ -35,7 +36,7 @@ class MonthlyChartWidget extends StatelessWidget {
Row(children: [
_summaryTile(
'Total Earnings'.tr,
'${sc.monthlyTotalEarnings.toStringAsFixed(0)} ${'SYP'.tr}',
'${sc.monthlyTotalEarnings.toStringAsFixed(0)} ${CurrencyHelper.currency}',
FinanceDesignSystem.successGreen),
const SizedBox(width: 12),
_summaryTile('Total Trips'.tr, '${sc.monthlyTotalTrips}',
@@ -58,7 +59,7 @@ class MonthlyChartWidget extends StatelessWidget {
touchTooltipData: LineTouchTooltipData(
getTooltipItems: (spots) => spots
.map((s) => LineTooltipItem(
'${s.y.toStringAsFixed(0)} ${'SYP'.tr}',
'${s.y.toStringAsFixed(0)} ${CurrencyHelper.currency}',
const TextStyle(
color: Colors.white,
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 'package:siro_driver/controller/home/captin/home_captain_controller.dart';
@@ -38,7 +39,7 @@ class TodayChartWidget extends StatelessWidget {
_buildRow(
Icons.monetization_on_rounded,
'Earnings'.tr,
'${hc.totalMoneyToday} ${'SYP'.tr}',
'${hc.totalMoneyToday} ${CurrencyHelper.currency}',
FinanceDesignSystem.successGreen),
const Divider(height: 24),
_buildRow(Icons.local_taxi_rounded, 'Rides'.tr, hc.countRideToday,

View File

@@ -1,3 +1,4 @@
import 'package:siro_driver/constant/currency.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:fl_chart/fl_chart.dart';
@@ -39,7 +40,7 @@ class WeeklyChartWidget extends StatelessWidget {
color: FinanceDesignSystem.successGreen.withOpacity(0.1),
borderRadius: BorderRadius.circular(12)),
child: Text(
'${sc.weeklyEarnings.toStringAsFixed(0)} ${'SYP'.tr}',
'${sc.weeklyEarnings.toStringAsFixed(0)} ${CurrencyHelper.currency}',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
@@ -73,7 +74,7 @@ class WeeklyChartWidget extends StatelessWidget {
touchTooltipData: BarTouchTooltipData(
getTooltipItem: (group, gi, rod, ri) =>
BarTooltipItem(
'${rod.toY.toStringAsFixed(0)} ${'SYP'.tr}',
'${rod.toY.toStringAsFixed(0)} ${CurrencyHelper.currency}',
const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,

View File

@@ -1,3 +1,4 @@
import 'package:siro_driver/constant/currency.dart';
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@@ -145,7 +146,7 @@ class RideAvailableCard extends StatelessWidget {
children: [
Text('Price'.tr, style: AppStyle.subtitle.copyWith(fontSize: 12)),
Text(
'${rideInfo['price']} ${'SYP'.tr}', // العملة
'${rideInfo['price']} ${CurrencyHelper.currency}', // العملة
style: AppStyle.title.copyWith(
fontSize: 20, color: AppColor.primaryColor, height: 1.2),
),