Update: 2026-06-11 18:22:57
This commit is contained in:
15
siro_driver/lib/constant/currency.dart
Normal file
15
siro_driver/lib/constant/currency.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:siro_driver/main.dart';
|
||||
import 'package:siro_driver/constant/box_name.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class CurrencyHelper {
|
||||
static String get currency {
|
||||
String country = box.read(BoxName.countryCode) ?? 'Jordan';
|
||||
switch (country) {
|
||||
case 'Syria': return 'SYP'.tr;
|
||||
case 'Egypt': return 'EGP'.tr;
|
||||
case 'Jordan':
|
||||
default: return 'JOD'.tr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,431 +4,446 @@ import '../main.dart';
|
||||
import 'box_name.dart';
|
||||
|
||||
class AppLink {
|
||||
static String serverPHP = box.read('serverPHP');
|
||||
static String get serverPHP => box.read('serverPHP');
|
||||
|
||||
static String paymentServer = 'https://walletintaleq.intaleq.xyz/v1/main';
|
||||
static String get paymentServer => 'https://walletintaleq.intaleq.xyz/v1/main';
|
||||
static const String appDomain = 'siromove.com';
|
||||
|
||||
static String locationServer =
|
||||
static String get locationServer =>
|
||||
'https://location.intaleq.xyz/siro/ride/location';
|
||||
static String locationServerSide =
|
||||
static String get locationServerSide =>
|
||||
'https://location.intaleq.xyz/siro/ride/location';
|
||||
static String mapSaasRoute = 'https://map-saas.intaleqapp.com/api/maps/route';
|
||||
static String mapSaasPlaces =
|
||||
static String get mapSaasRoute => 'https://map-saas.intaleqapp.com/api/maps/route';
|
||||
static String get mapSaasPlaces =>
|
||||
'https://map-saas.intaleqapp.com/api/geocoding/places';
|
||||
static const String routeApiBaseUrl =
|
||||
static String get routeApiBaseUrl =>
|
||||
"https://routesjo.intaleq.xyz/route/v1/driving";
|
||||
static final String endPoint = 'https://api.intaleq.xyz/intaleq_v3';
|
||||
static final String syria = 'https://syria.intaleq.xyz/siro';
|
||||
static final String server = endPoint;
|
||||
static String get currentCountry => box.read(BoxName.countryCode) ?? 'Jordan';
|
||||
|
||||
static String get endPoint {
|
||||
switch (currentCountry) {
|
||||
case 'Syria':
|
||||
return 'https://api-syria.siromove.com/intaleq_v3';
|
||||
case 'Egypt':
|
||||
return 'https://api-egypt.siromove.com/intaleq_v3';
|
||||
case 'Jordan':
|
||||
default:
|
||||
return 'https://api-jordan.siromove.com/intaleq_v3';
|
||||
}
|
||||
}
|
||||
|
||||
static String get syria => 'https://api-syria.siromove.com/siro';
|
||||
static String get server => endPoint;
|
||||
|
||||
///=================ride==========================///
|
||||
///https://api.intaleq.xyz/siro/ride
|
||||
static String ride = '$server/ride';
|
||||
static String rideServer = 'https://rides.intaleq.xyz/siro/ride';
|
||||
static String get ride => '$server/ride';
|
||||
static String get rideServer => 'https://rides.intaleq.xyz/siro/ride';
|
||||
|
||||
///mapOSM = 'https://routesy.intaleq.xyz'
|
||||
static String mapOSM = 'https://routesy.intaleq.xyz';
|
||||
static String get mapOSM => 'https://routesy.intaleq.xyz';
|
||||
|
||||
static String seferCairoServer = endPoint;
|
||||
static String seferGizaServer =
|
||||
static String get seferCairoServer => endPoint;
|
||||
static String get seferGizaServer =>
|
||||
box.read('Giza') ?? box.read(BoxName.serverChosen);
|
||||
static String seferAlexandriaServer =
|
||||
static String get seferAlexandriaServer =>
|
||||
box.read('Alexandria') ?? box.read(BoxName.serverChosen);
|
||||
// static final String server = Env.serverPHP;
|
||||
|
||||
static String loginJwtDriver = "$server/loginJwtDriver.php";
|
||||
static String loginJwtWalletDriver = "$server/loginJwtWalletDriver.php";
|
||||
static String loginFirstTimeDriver = "$server/loginFirstTimeDriver.php";
|
||||
static String get loginJwtDriver => "$server/loginJwtDriver.php";
|
||||
static String get loginJwtWalletDriver => "$server/loginJwtWalletDriver.php";
|
||||
static String get loginFirstTimeDriver => "$server/loginFirstTimeDriver.php";
|
||||
|
||||
static String googleMapsLink = 'https://maps.googleapis.com/maps/api/';
|
||||
static String llama = 'https://api.llama-api.com/chat/completions';
|
||||
static String gemini =
|
||||
static String get googleMapsLink => 'https://maps.googleapis.com/maps/api/';
|
||||
static String get llama => 'https://api.llama-api.com/chat/completions';
|
||||
static String get gemini =>
|
||||
'https://generativelanguage.googleapis.com/v1beta3/models/text-bison-001:generateText';
|
||||
|
||||
static String test = "$server/test.php";
|
||||
static String get test => "$server/test.php";
|
||||
|
||||
//===============contact==========================
|
||||
static String savePhones = "$ride/egyptPhones/add.php";
|
||||
static String savePhonesSyria = "$ride/egyptPhones/syrianAdd.php";
|
||||
static String getPhones = "$ride/egyptPhones/get.php";
|
||||
static String get savePhones => "$ride/egyptPhones/add.php";
|
||||
static String get savePhonesSyria => "$ride/egyptPhones/syrianAdd.php";
|
||||
static String get getPhones => "$ride/egyptPhones/get.php";
|
||||
|
||||
////===============firebase==========================
|
||||
static String getTokens = "$ride/firebase/get.php";
|
||||
static String get getTokens => "$ride/firebase/get.php";
|
||||
|
||||
static String getDriverToken = "$ride/firebase/getDriverToken.php";
|
||||
static String addTokens = "$ride/firebase/add.php";
|
||||
static String addTokensDriver = "$ride/firebase/addDriver.php";
|
||||
static String addTokensDriverWallet =
|
||||
static String get getDriverToken => "$ride/firebase/getDriverToken.php";
|
||||
static String get addTokens => "$ride/firebase/add.php";
|
||||
static String get addTokensDriver => "$ride/firebase/addDriver.php";
|
||||
static String get addTokensDriverWallet =>
|
||||
"$paymentServer/ride/firebase/addDriver.php";
|
||||
|
||||
//=======================Wallet===================
|
||||
static String wallet = '$paymentServer/ride/passengerWallet';
|
||||
static String walletDriver = '$paymentServer/ride/driverWallet';
|
||||
static String getAllPassengerTransaction =
|
||||
static String get wallet => '$paymentServer/ride/passengerWallet';
|
||||
static String get walletDriver => '$paymentServer/ride/driverWallet';
|
||||
static String get getAllPassengerTransaction =>
|
||||
"$wallet/getAllPassengerTransaction.php";
|
||||
static String payWithMTNConfirm =
|
||||
static String get payWithMTNConfirm =>
|
||||
"$paymentServer/ride/mtn/driver/confirm_payment.php";
|
||||
static String payWithMTNStart =
|
||||
static String get payWithMTNStart =>
|
||||
"$paymentServer/ride/mtn/driver/mtn_start.php";
|
||||
static String payWithSyriatelConfirm =
|
||||
static String get payWithSyriatelConfirm =>
|
||||
"$paymentServer/ride/syriatel/driver/confirm_payment.php";
|
||||
static String payWithSyriatelStart =
|
||||
static String get payWithSyriatelStart =>
|
||||
"$paymentServer/ride/syriatel/driver/start_payment.php";
|
||||
static String payWithEcashDriver =
|
||||
static String get payWithEcashDriver =>
|
||||
"$paymentServer/ride/ecash/driver/payWithEcash.php";
|
||||
static String payWithEcashPassenger =
|
||||
static String get payWithEcashPassenger =>
|
||||
"$paymentServer/ride/ecash/passenger/payWithEcash.php";
|
||||
// wl.tripz-egypt.com/v1/main/ride/ecash/driver
|
||||
static String getWalletByPassenger = "$wallet/getWalletByPassenger.php";
|
||||
static String getPassengersWallet = "$wallet/get.php";
|
||||
static String getPassengerWalletArchive =
|
||||
static String get getWalletByPassenger => "$wallet/getWalletByPassenger.php";
|
||||
static String get getPassengersWallet => "$wallet/get.php";
|
||||
static String get getPassengerWalletArchive =>
|
||||
"$wallet/getPassengerWalletArchive.php";
|
||||
static String addPassengersWallet = "$wallet/add.php";
|
||||
static String deletePassengersWallet = "$wallet/delete.php";
|
||||
static String updatePassengersWallet = "$wallet/update.php";
|
||||
static String get addPassengersWallet => "$wallet/add.php";
|
||||
static String get deletePassengersWallet => "$wallet/delete.php";
|
||||
static String get updatePassengersWallet => "$wallet/update.php";
|
||||
|
||||
static String getWalletByDriver = "$walletDriver/getWalletByDriver.php";
|
||||
static String driverStatistic =
|
||||
static String get getWalletByDriver => "$walletDriver/getWalletByDriver.php";
|
||||
static String get driverStatistic =>
|
||||
"$endPoint/ride/driverWallet/driverStatistic.php";
|
||||
static String getDriverDetails =
|
||||
static String get getDriverDetails =>
|
||||
"$seferCairoServer/ride/driverWallet/getDriverDetails.php";
|
||||
|
||||
// ================= Gamification Endpoints =================
|
||||
static String getWeeklyAggregate =
|
||||
static String get getWeeklyAggregate =>
|
||||
"$endPoint/ride/gamification/getWeeklyAggregate.php";
|
||||
static String getLeaderboard =
|
||||
static String get getLeaderboard =>
|
||||
"$endPoint/ride/gamification/getLeaderboard.php";
|
||||
static String claimChallengeReward =
|
||||
static String get claimChallengeReward =>
|
||||
"$endPoint/ride/gamification/claimChallengeReward.php";
|
||||
static String getReferralStats =
|
||||
static String get getReferralStats =>
|
||||
"$endPoint/ride/gamification/getReferralStats.php";
|
||||
static String getDriverBehavior =
|
||||
static String get getDriverBehavior =>
|
||||
"$endPoint/ride/gamification/getDriverBehavior.php";
|
||||
static String getDriverWeekPaymentMove =
|
||||
static String get getDriverWeekPaymentMove =>
|
||||
"$walletDriver/getDriverWeekPaymentMove.php";
|
||||
static String getDriversWallet = "$walletDriver/get.php";
|
||||
static String addDriversWalletPoints = "$walletDriver/add.php";
|
||||
static String addpromotionDriver = "$walletDriver/promotionDriver.php";
|
||||
static String deleteDriversWallet = "$walletDriver/delete.php";
|
||||
static String updateDriversWallet = "$walletDriver/update.php";
|
||||
static String get getDriversWallet => "$walletDriver/get.php";
|
||||
static String get addDriversWalletPoints => "$walletDriver/add.php";
|
||||
static String get addpromotionDriver => "$walletDriver/promotionDriver.php";
|
||||
static String get deleteDriversWallet => "$walletDriver/delete.php";
|
||||
static String get updateDriversWallet => "$walletDriver/update.php";
|
||||
|
||||
//=======================promo===================ride.mobile-app.store/ride/promo/get.php
|
||||
static String promo = '$server/ride/promo';
|
||||
static String getPassengersPromo = "$promo/get.php";
|
||||
static String getPromoBytody = "$promo/getPromoBytody.php";
|
||||
static String addPassengersPromo = "$promo/add.php";
|
||||
static String deletePassengersPromo = "$promo/delete.php";
|
||||
static String updatePassengersPromo = "$promo/update.php";
|
||||
static String get promo => '$server/ride/promo';
|
||||
static String get getPassengersPromo => "$promo/get.php";
|
||||
static String get getPromoBytody => "$promo/getPromoBytody.php";
|
||||
static String get addPassengersPromo => "$promo/add.php";
|
||||
static String get deletePassengersPromo => "$promo/delete.php";
|
||||
static String get updatePassengersPromo => "$promo/update.php";
|
||||
|
||||
////=======================cancelRide===================
|
||||
|
||||
static String addCancelRideFromPassenger = "$rideServer/cancelRide/add.php";
|
||||
static String addCancelTripFromDriverAfterApplied =
|
||||
static String get addCancelRideFromPassenger => "$rideServer/cancelRide/add.php";
|
||||
static String get addCancelTripFromDriverAfterApplied =>
|
||||
"$rideServer/cancelRide/addCancelTripFromDriverAfterApplied.php";
|
||||
static String cancelRide = "$rideServer/cancelRide/get.php";
|
||||
static String get cancelRide => "$rideServer/cancelRide/get.php";
|
||||
//-----------------ridessss------------------
|
||||
static String addRides = "$rideServer/rides/add.php";
|
||||
static String getRides = "$rideServer/rides/get.php";
|
||||
static String getPlacesSyria = "$rideServer/places_syria/get.php";
|
||||
static String getMishwari = "$rideServer/mishwari/get.php";
|
||||
static String getMishwariDriver = "$rideServer/mishwari/getDriver.php";
|
||||
static String sendChatMessage = "$server/ride/chat/send_message.php";
|
||||
static String getTripCountByCaptain =
|
||||
static String get addRides => "$rideServer/rides/add.php";
|
||||
static String get getRides => "$rideServer/rides/get.php";
|
||||
static String get getPlacesSyria => "$rideServer/places_syria/get.php";
|
||||
static String get getMishwari => "$rideServer/mishwari/get.php";
|
||||
static String get getMishwariDriver => "$rideServer/mishwari/getDriver.php";
|
||||
static String get sendChatMessage => "$server/ride/chat/send_message.php";
|
||||
static String get getTripCountByCaptain =>
|
||||
"$rideServer/rides/getTripCountByCaptain.php";
|
||||
static String getRideOrderID = "$rideServer/rides/getRideOrderID.php";
|
||||
static String getRideStatus = "$rideServer/rides/getRideStatus.php";
|
||||
static String getOverLayStatus = "$ride/overLay/get.php";
|
||||
static String getArgumentAfterAppliedFromBackground =
|
||||
static String get getRideOrderID => "$rideServer/rides/getRideOrderID.php";
|
||||
static String get getRideStatus => "$rideServer/rides/getRideStatus.php";
|
||||
static String get getOverLayStatus => "$ride/overLay/get.php";
|
||||
static String get getArgumentAfterAppliedFromBackground =>
|
||||
"$ride/overLay/getArgumentAfterAppliedFromBackground.php";
|
||||
static String addOverLayStatus = "$ride/overLay/add.php";
|
||||
static String getapiKey = "$ride/apiKey/get.php";
|
||||
static String get addOverLayStatus => "$ride/overLay/add.php";
|
||||
static String get getapiKey => "$ride/apiKey/get.php";
|
||||
|
||||
static String getapiKeySefer = "$ride/apiKey/get.php";
|
||||
static String getRideStatusBegin = "$rideServer/rides/getRideStatusBegin.php";
|
||||
static String getRideStatusFromStartApp =
|
||||
static String get getapiKeySefer => "$ride/apiKey/get.php";
|
||||
static String get getRideStatusBegin => "$rideServer/rides/getRideStatusBegin.php";
|
||||
static String get getRideStatusFromStartApp =>
|
||||
"$rideServer/rides/getRideStatusFromStartApp.php";
|
||||
static String updateRides = "$rideServer/rides/update.php";
|
||||
static String updateRideAndCheckIfApplied =
|
||||
static String get updateRides => "$rideServer/rides/update.php";
|
||||
static String get updateRideAndCheckIfApplied =>
|
||||
"$rideServer/rides/updateRideAndCheckIfApplied.php";
|
||||
static String updateStausFromSpeed =
|
||||
static String get updateStausFromSpeed =>
|
||||
"$rideServer/rides/updateStausFromSpeed.php";
|
||||
static String deleteRides = "$rideServer/rides/delete.php";
|
||||
static String get deleteRides => "$rideServer/rides/delete.php";
|
||||
|
||||
//-----------------DriverPayment------------------
|
||||
static String addDriverScam = "$ride/driver_scam/add.php";
|
||||
static String getDriverScam = "$ride/driver_scam/get.php";
|
||||
static String get addDriverScam => "$ride/driver_scam/add.php";
|
||||
static String get getDriverScam => "$ride/driver_scam/get.php";
|
||||
|
||||
/////////---getKazanPercent===////////////
|
||||
static String getKazanPercent = "$ride/kazan/get.php";
|
||||
static String addKazanPercent = "$ride/kazan/add.php";
|
||||
static String get getKazanPercent => "$ride/kazan/get.php";
|
||||
static String get addKazanPercent => "$ride/kazan/add.php";
|
||||
|
||||
////-----------------DriverPayment------------------
|
||||
static String addDrivePayment = "$paymentServer/ride/payment/add.php";
|
||||
static String payWithPayMobCardDriver =
|
||||
static String get addDrivePayment => "$paymentServer/ride/payment/add.php";
|
||||
static String get payWithPayMobCardDriver =>
|
||||
"$paymentServer/ride/payMob/paymob_driver/payWithCard.php";
|
||||
static String payWithWallet =
|
||||
static String get payWithWallet =>
|
||||
"$paymentServer/ride/payMob/paymob_driver/payWithWallet.php";
|
||||
static String paymetVerifyDriver =
|
||||
static String get paymetVerifyDriver =>
|
||||
"$paymentServer/ride/payMob/paymob_driver/paymet_verfy.php";
|
||||
static String updatePaymetToPaid =
|
||||
static String get updatePaymetToPaid =>
|
||||
"$paymentServer/ride/payment/updatePaymetToPaid.php";
|
||||
static String paymobPayoutDriverWallet =
|
||||
static String get paymobPayoutDriverWallet =>
|
||||
"$paymentServer/ride/payMob/paymob_driver/paymob_payout.php'";
|
||||
|
||||
static String addSeferWallet = "$paymentServer/ride/seferWallet/add.php";
|
||||
static String getSeferWallet = "$paymentServer/ride/seferWallet/get.php";
|
||||
static String addDriverPaymentPoints =
|
||||
static String get addSeferWallet => "$paymentServer/ride/seferWallet/add.php";
|
||||
static String get getSeferWallet => "$paymentServer/ride/seferWallet/get.php";
|
||||
static String get addDriverPaymentPoints =>
|
||||
"$paymentServer/ride/driverPayment/add.php";
|
||||
static String addPaymentTokenDriver =
|
||||
static String get addPaymentTokenDriver =>
|
||||
"$paymentServer/ride/driverWallet/addPaymentToken.php"; //driverWallet/addPaymentToken.php
|
||||
static String addPaymentTokenPassenger =
|
||||
static String get addPaymentTokenPassenger =>
|
||||
"$paymentServer/ride/passengerWallet/addPaymentTokenPassenger.php";
|
||||
static String getDriverPaymentPoints =
|
||||
static String get getDriverPaymentPoints =>
|
||||
"$paymentServer/ride/driverWallet/get.php";
|
||||
static String getDriverPaymentToday = "$paymentServer/ride/payment/get.php";
|
||||
static String getCountRide = "$rideServer/payment/getCountRide.php";
|
||||
static String getAllPaymentFromRide =
|
||||
static String get getDriverPaymentToday => "$paymentServer/ride/payment/get.php";
|
||||
static String get getCountRide => "$rideServer/payment/getCountRide.php";
|
||||
static String get getAllPaymentFromRide =>
|
||||
"$paymentServer/ride/payment/getAllPayment.php";
|
||||
static String getAllPaymentVisa =
|
||||
static String get getAllPaymentVisa =>
|
||||
"$paymentServer/ride/payment/getAllPaymentVisa.php";
|
||||
|
||||
//-----------------Passenger NotificationCaptain------------------
|
||||
static String addNotificationPassenger =
|
||||
static String get addNotificationPassenger =>
|
||||
"$ride/notificationPassenger/add.php";
|
||||
static String getNotificationPassenger =
|
||||
static String get getNotificationPassenger =>
|
||||
"$ride/notificationPassenger/get.php";
|
||||
static String updateNotificationPassenger =
|
||||
static String get updateNotificationPassenger =>
|
||||
"$ride/notificationPassenger/update.php";
|
||||
//-----------------Driver NotificationCaptain------------------
|
||||
static String addNotificationCaptain = "$ride/notificationCaptain/add.php";
|
||||
static String addWaitingRide = "$ride/notificationCaptain/addWaitingRide.php";
|
||||
static String deleteAvailableRide =
|
||||
static String get addNotificationCaptain => "$ride/notificationCaptain/add.php";
|
||||
static String get addWaitingRide => "$ride/notificationCaptain/addWaitingRide.php";
|
||||
static String get deleteAvailableRide =>
|
||||
"$ride/notificationCaptain/deleteAvailableRide.php";
|
||||
static String updateWaitingRide =
|
||||
static String get updateWaitingRide =>
|
||||
"$ride/notificationCaptain/updateWaitingTrip.php";
|
||||
static String getRideWaiting =
|
||||
static String get getRideWaiting =>
|
||||
"$endPoint/ride/notificationCaptain/getRideWaiting.php";
|
||||
static String getNotificationCaptain = "$ride/notificationCaptain/get.php";
|
||||
static String updateNotificationCaptain =
|
||||
static String get getNotificationCaptain => "$ride/notificationCaptain/get.php";
|
||||
static String get updateNotificationCaptain =>
|
||||
"$ride/notificationCaptain/update.php";
|
||||
static String deleteNotificationCaptain =
|
||||
static String get deleteNotificationCaptain =>
|
||||
"$ride/notificationCaptain/delete.php";
|
||||
//-----------------Api Key------------------
|
||||
static String addApiKey = "$ride/apiKey/add.php";
|
||||
static String getApiKey = "$ride/apiKey/get.php";
|
||||
static String getCnMap = "$server/auth/cnMap.php";
|
||||
static String getPromptDriverDocumentsEgypt =
|
||||
static String get addApiKey => "$ride/apiKey/add.php";
|
||||
static String get getApiKey => "$ride/apiKey/get.php";
|
||||
static String get getCnMap => "$server/auth/cnMap.php";
|
||||
static String get getPromptDriverDocumentsEgypt =>
|
||||
"$server/auth/captin/getPromptDriverDocumentsEgypt.php";
|
||||
|
||||
static String updateApiKey = "$ride/apiKey/update.php";
|
||||
static String deleteApiKey = "$ride/apiKey/delete.php";
|
||||
static String checkPhoneNumberISVerfiedDriver =
|
||||
static String get updateApiKey => "$ride/apiKey/update.php";
|
||||
static String get deleteApiKey => "$ride/apiKey/delete.php";
|
||||
static String get checkPhoneNumberISVerfiedDriver =>
|
||||
"$auth/checkPhoneNumberISVerfiedDriver.php";
|
||||
static String getTesterApp = "$auth/Tester/getTesterApp.php";
|
||||
static String updateTesterApp = "$auth/Tester/updateTesterApp.php";
|
||||
static String get getTesterApp => "$auth/Tester/getTesterApp.php";
|
||||
static String get updateTesterApp => "$auth/Tester/updateTesterApp.php";
|
||||
|
||||
//-----------------healthInsuranceProvider------------------
|
||||
static String addHealthInsuranceProvider = "$server/driver_assurance/add.php";
|
||||
static String getHealthInsuranceProvider = "$server/driver_assurance/get.php";
|
||||
static String get addHealthInsuranceProvider => "$server/driver_assurance/add.php";
|
||||
static String get getHealthInsuranceProvider => "$server/driver_assurance/get.php";
|
||||
|
||||
//-----------------Feed Back------------------
|
||||
static String addFeedBack = "$ride/feedBack/add.php";
|
||||
static String getFeedBack = "$ride/feedBack/get.php";
|
||||
static String updateFeedBack = "$ride/feedBack/updateFeedBack.php";
|
||||
static String add_solve_all = "$server/ride/feedBack/add_solve_all.php";
|
||||
static String uploadAudio = "$server/upload_audio.php";
|
||||
static String get addFeedBack => "$ride/feedBack/add.php";
|
||||
static String get getFeedBack => "$ride/feedBack/get.php";
|
||||
static String get updateFeedBack => "$ride/feedBack/updateFeedBack.php";
|
||||
static String get add_solve_all => "$server/ride/feedBack/add_solve_all.php";
|
||||
static String get uploadAudio => "$server/upload_audio.php";
|
||||
|
||||
//-----------------Tips------------------
|
||||
static String addTips = "$ride/tips/add.php";
|
||||
static String getTips = "$ride/tips/get.php";
|
||||
static String updateTips = "$ride/tips/update.php";
|
||||
static String get addTips => "$ride/tips/add.php";
|
||||
static String get getTips => "$ride/tips/get.php";
|
||||
static String get updateTips => "$ride/tips/update.php";
|
||||
|
||||
//-----------------Help Center------------------
|
||||
static String addhelpCenter = "$ride/helpCenter/add.php";
|
||||
static String gethelpCenter = "$ride/helpCenter/get.php";
|
||||
static String getByIdhelpCenter = "$ride/helpCenter/getById.php";
|
||||
static String updatehelpCenter = "$ride/helpCenter/update.php";
|
||||
static String deletehelpCenter = "$ride/helpCenter/delete.php";
|
||||
static String get addhelpCenter => "$ride/helpCenter/add.php";
|
||||
static String get gethelpCenter => "$ride/helpCenter/get.php";
|
||||
static String get getByIdhelpCenter => "$ride/helpCenter/getById.php";
|
||||
static String get updatehelpCenter => "$ride/helpCenter/update.php";
|
||||
static String get deletehelpCenter => "$ride/helpCenter/delete.php";
|
||||
|
||||
//-----------------license------------------
|
||||
static String addLicense = "$ride/license/add.php";
|
||||
static String getLicense = "$ride/license/get.php";
|
||||
static String updateLicense = "$ride/license/updateFeedBack.php";
|
||||
static String get addLicense => "$ride/license/add.php";
|
||||
static String get getLicense => "$ride/license/get.php";
|
||||
static String get updateLicense => "$ride/license/updateFeedBack.php";
|
||||
//-----------------RegisrationCar------------------
|
||||
static String addRegisrationCar = "$ride/RegisrationCar/add.php";
|
||||
static String getRegisrationCar = "$endPoint/ride/RegisrationCar/get.php";
|
||||
static String updateRegisrationCar = "$ride/RegisrationCar/update.php";
|
||||
static String makeDefaultCar = "$ride/RegisrationCar/makeDefaultCar.php";
|
||||
static String get addRegisrationCar => "$ride/RegisrationCar/add.php";
|
||||
static String get getRegisrationCar => "$endPoint/ride/RegisrationCar/get.php";
|
||||
static String get updateRegisrationCar => "$ride/RegisrationCar/update.php";
|
||||
static String get makeDefaultCar => "$ride/RegisrationCar/makeDefaultCar.php";
|
||||
|
||||
//-----------------DriverOrder------------------
|
||||
|
||||
static String addDriverOrder = "$ride/driver_order/add.php";
|
||||
static String getDriverOrder = "$ride/driver_order/get.php";
|
||||
static String getOrderCancelStatus =
|
||||
static String get addDriverOrder => "$ride/driver_order/add.php";
|
||||
static String get getDriverOrder => "$ride/driver_order/get.php";
|
||||
static String get getOrderCancelStatus =>
|
||||
"$ride/driver_order/getOrderCancelStatus.php";
|
||||
static String updateDriverOrder = "$ride/driver_order/update.php";
|
||||
static String deleteDriverOrder = "$ride/driver_order/delete.php";
|
||||
static String get updateDriverOrder => "$ride/driver_order/update.php";
|
||||
static String get deleteDriverOrder => "$ride/driver_order/delete.php";
|
||||
|
||||
// =====================================
|
||||
static String addRateToPassenger = "$ride/rate/add.php";
|
||||
static String addRateToDriver = "$ride/rate/addRateToDriver.php";
|
||||
static String addRateApp = "$ride/rate/add_rate_app.php";
|
||||
static String sendEmailRateingApp = "$ride/rate/sendEmailRateingApp.php";
|
||||
static String getDriverRate = "$ride/rate/getDriverRate.php";
|
||||
static String getPassengerRate = "$ride/rate/getPassengerRate.php";
|
||||
static String get addRateToPassenger => "$ride/rate/add.php";
|
||||
static String get addRateToDriver => "$ride/rate/addRateToDriver.php";
|
||||
static String get addRateApp => "$ride/rate/add_rate_app.php";
|
||||
static String get sendEmailRateingApp => "$ride/rate/sendEmailRateingApp.php";
|
||||
static String get getDriverRate => "$ride/rate/getDriverRate.php";
|
||||
static String get getPassengerRate => "$ride/rate/getPassengerRate.php";
|
||||
|
||||
////////////////emails ============//
|
||||
static String sendEmailToPassengerForTripDetails =
|
||||
static String get sendEmailToPassengerForTripDetails =>
|
||||
"$ride/rides/emailToPassengerTripDetail.php";
|
||||
static String sendEmailToDrivertransaction =
|
||||
static String get sendEmailToDrivertransaction =>
|
||||
"$server/Admin/sendEmailToDrivertransaction.php";
|
||||
// ===========================================
|
||||
static String pathImage = "$server/upload/types/";
|
||||
static String uploadImage = "$server/uploadImage.php";
|
||||
static String uploadImage1 = "$server/uploadImage1.php";
|
||||
static String uploadImagePortrate = "$server/uploadImagePortrate.php";
|
||||
static String uploadSyrianDocs = "$syria/auth/syria/uploadSyrianDocs.php";
|
||||
static String uploadImageType = "$server/uploadImageType.php";
|
||||
static String get pathImage => "$server/upload/types/";
|
||||
static String get uploadImage => "$server/uploadImage.php";
|
||||
static String get uploadImage1 => "$server/uploadImage1.php";
|
||||
static String get uploadImagePortrate => "$server/uploadImagePortrate.php";
|
||||
static String get uploadSyrianDocs => "$syria/auth/syria/uploadSyrianDocs.php";
|
||||
static String get uploadImageType => "$server/uploadImageType.php";
|
||||
//=============egypt documents ==============
|
||||
static String uploadEgyptidFront =
|
||||
static String get uploadEgyptidFront =>
|
||||
"$server/EgyptDocuments/uploadEgyptidFront.php";
|
||||
static String uploadEgypt = "$server/uploadEgypt.php";
|
||||
static String uploadEgypt1 = "$server/uploadEgypt1.php";
|
||||
static String get uploadEgypt => "$server/uploadEgypt.php";
|
||||
static String get uploadEgypt1 => "$server/uploadEgypt1.php";
|
||||
|
||||
//==================certifcate==========
|
||||
// static String location = '$endPoint/ride/location';
|
||||
|
||||
static String getCarsLocationByPassenger = "$locationServer/get.php";
|
||||
static String addpassengerLocation =
|
||||
static String get getCarsLocationByPassenger => "$locationServer/get.php";
|
||||
static String get addpassengerLocation =>
|
||||
"$locationServer/addpassengerLocation.php";
|
||||
static String getLocationAreaLinks =
|
||||
static String get getLocationAreaLinks =>
|
||||
"$locationServer/get_location_area_links.php";
|
||||
static String getLatestLocationPassenger =
|
||||
static String get getLatestLocationPassenger =>
|
||||
"$locationServer/getLatestLocationPassenger.php";
|
||||
static String getFemalDriverLocationByPassenger =
|
||||
static String get getFemalDriverLocationByPassenger =>
|
||||
"$locationServer/getFemalDriver.php";
|
||||
static String getDriverCarsLocationToPassengerAfterApplied =
|
||||
static String get getDriverCarsLocationToPassengerAfterApplied =>
|
||||
"$locationServer/getDriverCarsLocationToPassengerAfterApplied.php";
|
||||
static String addCarsLocationByPassenger = "$locationServer/add.php";
|
||||
static String saveBehavior = "$locationServer/save_behavior.php";
|
||||
static String addCarsLocationGizaEndpoint = "$locationServer/add.php";
|
||||
static String addCarsLocationAlexandriaEndpoint = "$locationServer/add.php";
|
||||
static String addCarsLocationCairoEndpoint = "$locationServer/add.php";
|
||||
static String deleteCarsLocationByPassenger = "$locationServer/delete.php";
|
||||
static String updateCarsLocationByPassenger = "$locationServer/update.php";
|
||||
static String getTotalDriverDuration =
|
||||
static String get addCarsLocationByPassenger => "$locationServer/add.php";
|
||||
static String get saveBehavior => "$locationServer/save_behavior.php";
|
||||
static String get addCarsLocationGizaEndpoint => "$locationServer/add.php";
|
||||
static String get addCarsLocationAlexandriaEndpoint => "$locationServer/add.php";
|
||||
static String get addCarsLocationCairoEndpoint => "$locationServer/add.php";
|
||||
static String get deleteCarsLocationByPassenger => "$locationServer/delete.php";
|
||||
static String get updateCarsLocationByPassenger => "$locationServer/update.php";
|
||||
static String get getTotalDriverDuration =>
|
||||
"$locationServer/getTotalDriverDuration.php";
|
||||
static String getRidesDriverByDay = "$locationServer/getRidesDriverByDay.php";
|
||||
static String getTotalDriverDurationToday =
|
||||
static String get getRidesDriverByDay => "$locationServer/getRidesDriverByDay.php";
|
||||
static String get getTotalDriverDurationToday =>
|
||||
"$locationServer/getTotalDriverDurationToday.php";
|
||||
|
||||
//==================get_driver_behavior.php=============
|
||||
static String get_driver_behavior =
|
||||
static String get get_driver_behavior =>
|
||||
'$ride/driver_behavior/get_driver_behavior.php';
|
||||
|
||||
//==================cars new drivers=============
|
||||
static String addNewCarsDrivers = '$ride/carDrivers/add.php';
|
||||
static String getNewCarsDrivers = '$ride/carDrivers/get.php';
|
||||
static String deleteNewCarsDrivers = '$ride/carDrivers/delete.php';
|
||||
static String get addNewCarsDrivers => '$ride/carDrivers/add.php';
|
||||
static String get getNewCarsDrivers => '$ride/carDrivers/get.php';
|
||||
static String get deleteNewCarsDrivers => '$ride/carDrivers/delete.php';
|
||||
|
||||
//==================Blog=============
|
||||
static String profile = '$ride/profile';
|
||||
static String getprofile = "$profile/get.php";
|
||||
static String getCaptainProfile = "$profile/getCaptainProfile.php";
|
||||
static String addprofile = "$profile/add.php";
|
||||
static String deleteprofile = "$profile/delete.php";
|
||||
static String updateprofile = "$profile/update.php";
|
||||
static String updateDriverEmail = "$profile/updateDriverEmail.php";
|
||||
static String get profile => '$ride/profile';
|
||||
static String get getprofile => "$profile/get.php";
|
||||
static String get getCaptainProfile => "$profile/getCaptainProfile.php";
|
||||
static String get addprofile => "$profile/add.php";
|
||||
static String get deleteprofile => "$profile/delete.php";
|
||||
static String get updateprofile => "$profile/update.php";
|
||||
static String get updateDriverEmail => "$profile/updateDriverEmail.php";
|
||||
|
||||
//===================Auth============
|
||||
|
||||
static String getUnifiedCode = "$ride/invitor/get_unified_code.php";
|
||||
static String addUnifiedInvite = "$ride/invitor/add_unified_invite.php";
|
||||
static String claimDriverReward = "$ride/invitor/claim_driver_reward.php";
|
||||
static String getDriverReferrals = "$ride/invitor/get_driver_referrals.php";
|
||||
static String get getUnifiedCode => "$ride/invitor/get_unified_code.php";
|
||||
static String get addUnifiedInvite => "$ride/invitor/add_unified_invite.php";
|
||||
static String get claimDriverReward => "$ride/invitor/claim_driver_reward.php";
|
||||
static String get getDriverReferrals => "$ride/invitor/get_driver_referrals.php";
|
||||
|
||||
static String addInviteDriver = "$ride/invitor/add.php";
|
||||
static String addInvitationPassenger =
|
||||
static String get addInviteDriver => "$ride/invitor/add.php";
|
||||
static String get addInvitationPassenger =>
|
||||
"$ride/invitor/addInvitationPassenger.php";
|
||||
static String getInviteDriver = "$ride/invitor/get.php";
|
||||
static String getDriverInvitationToPassengers =
|
||||
static String get getInviteDriver => "$ride/invitor/get.php";
|
||||
static String get getDriverInvitationToPassengers =>
|
||||
"$ride/invitor/getDriverInvitationToPassengers.php";
|
||||
static String updateInviteDriver = "$ride/invitor/update.php";
|
||||
static String updatePassengerGift = "$ride/invitor/updatePassengerGift.php";
|
||||
static String updateInvitationCodeFromRegister =
|
||||
static String get updateInviteDriver => "$ride/invitor/update.php";
|
||||
static String get updatePassengerGift =>
|
||||
"$server/ride/invitor/updatePassengerGift.php";
|
||||
static String get claimInviteReward => "$server/ride/invitor/claim.php";
|
||||
static String get updateInvitationCodeFromRegister =>
|
||||
"$ride/invitor/updateInvitationCodeFromRegister.php";
|
||||
static String register_driver_and_car =
|
||||
static String get register_driver_and_car =>
|
||||
"$auth/syria/driver/register_driver_and_car.php";
|
||||
static String updateDriverInvitationDirectly =
|
||||
static String get updateDriverInvitationDirectly =>
|
||||
"$ride/invitor/updateDriverInvitationDirectly.php";
|
||||
static String updatePassengersInvitation =
|
||||
static String get updatePassengersInvitation =>
|
||||
"$ride/invitor/updatePassengersInvitation.php";
|
||||
|
||||
//===================Auth============
|
||||
|
||||
static String auth = '$server/auth';
|
||||
static String login = "$auth/login.php";
|
||||
static String signUp = "$auth/signup.php";
|
||||
static String updateDriverClaim = "$auth/captin/updateDriverClaim.php";
|
||||
static String updateShamCashDriver = "$auth/captin/updateShamCashDriver.php";
|
||||
static String sendVerifyEmail = "$auth/sendVerifyEmail.php";
|
||||
static String passengerRemovedAccountEmail =
|
||||
static String get auth => '$server/auth';
|
||||
static String get login => "$auth/login.php";
|
||||
static String get signUp => "$auth/signup.php";
|
||||
static String get updateDriverClaim => "$auth/captin/updateDriverClaim.php";
|
||||
static String get updateShamCashDriver => "$auth/captin/updateShamCashDriver.php";
|
||||
static String get sendVerifyEmail => "$auth/sendVerifyEmail.php";
|
||||
static String get passengerRemovedAccountEmail =>
|
||||
"$auth/passengerRemovedAccountEmail.php";
|
||||
static String verifyEmail = "$auth/verifyEmail.php";
|
||||
static String get verifyEmail => "$auth/verifyEmail.php";
|
||||
//===================Auth Captin============
|
||||
static String authCaptin = '$server/auth/captin';
|
||||
static String loginCaptin = "$authCaptin/login.php";
|
||||
static String loginFromGoogleCaptin = "$authCaptin/loginFromGoogle.php";
|
||||
static String loginUsingCredentialsWithoutGoogle =
|
||||
static String get authCaptin => '$server/auth/captin';
|
||||
static String get loginCaptin => "$authCaptin/login.php";
|
||||
static String get loginFromGoogleCaptin => "$authCaptin/loginFromGoogle.php";
|
||||
static String get loginUsingCredentialsWithoutGoogle =>
|
||||
"$authCaptin/loginUsingCredentialsWithoutGoogle.php";
|
||||
static String packageInfo = "$server/auth/packageInfo.php";
|
||||
static String signUpCaptin = "$authCaptin/register.php";
|
||||
static String addCriminalDocuments = "$authCaptin/addCriminalDocuments.php";
|
||||
static String sendVerifyEmailCaptin = "$authCaptin/sendVerifyEmail.php";
|
||||
static String sendVerifyOtpMessage =
|
||||
static String get packageInfo => "$server/auth/packageInfo.php";
|
||||
static String get signUpCaptin => "$authCaptin/register.php";
|
||||
static String get addCriminalDocuments => "$authCaptin/addCriminalDocuments.php";
|
||||
static String get sendVerifyEmailCaptin => "$authCaptin/sendVerifyEmail.php";
|
||||
static String get sendVerifyOtpMessage =>
|
||||
"$server/auth/captin/sendOtpMessageDriver.php";
|
||||
static String verifyOtpMessage = "$server/auth/verifyOtpMessage.php";
|
||||
static String verifyOtpDriver = "$server/auth/captin/verifyOtpDriver.php";
|
||||
static String verifyEmailCaptin = "$authCaptin/verifyEmail.php";
|
||||
static String removeUser = "$authCaptin/removeAccount.php";
|
||||
static String deletecaptainAccounr = "$authCaptin/deletecaptainAccounr.php";
|
||||
static String updateAccountBank = "$authCaptin/updateAccountBank.php";
|
||||
static String getAccount = "$authCaptin/getAccount.php";
|
||||
static String uploadImageToAi = "$auth/document_syria/ai_document.php";
|
||||
static String isPhoneVerified = "$auth/syria/driver/isPhoneVerified.php";
|
||||
static String get verifyOtpMessage => "$server/auth/verifyOtpMessage.php";
|
||||
static String get verifyOtpDriver => "$server/auth/captin/verifyOtpDriver.php";
|
||||
static String get verifyEmailCaptin => "$authCaptin/verifyEmail.php";
|
||||
static String get removeUser => "$authCaptin/removeAccount.php";
|
||||
static String get deletecaptainAccounr => "$authCaptin/deletecaptainAccounr.php";
|
||||
static String get updateAccountBank => "$authCaptin/updateAccountBank.php";
|
||||
static String get getAccount => "$authCaptin/getAccount.php";
|
||||
static String get uploadImageToAi => "$auth/document_syria/ai_document.php";
|
||||
static String get isPhoneVerified => "$auth/syria/driver/isPhoneVerified.php";
|
||||
|
||||
//===================Admin Captin============
|
||||
|
||||
static String getPassengerDetailsByPassengerID =
|
||||
static String get getPassengerDetailsByPassengerID =>
|
||||
"$server/Admin/getPassengerDetailsByPassengerID.php";
|
||||
static String getPassengerDetails = "$server/Admin/getPassengerDetails.php";
|
||||
static String getPassengerbyEmail = "$server/Admin/getPassengerbyEmail.php";
|
||||
static String addAdminUser = "$server/Admin/adminUser/add.php";
|
||||
static String addError = "$server/Admin/errorApp.php";
|
||||
static String getAdminUser = "$server/Admin/adminUser/get.php";
|
||||
static String getCaptainDetailsByEmailOrIDOrPhone =
|
||||
static String get getPassengerDetails => "$server/Admin/getPassengerDetails.php";
|
||||
static String get getPassengerbyEmail => "$server/Admin/getPassengerbyEmail.php";
|
||||
static String get addAdminUser => "$server/Admin/adminUser/add.php";
|
||||
static String get addError => "$server/Admin/errorApp.php";
|
||||
static String get getAdminUser => "$server/Admin/adminUser/get.php";
|
||||
static String get getCaptainDetailsByEmailOrIDOrPhone =>
|
||||
"$server/Admin/AdminCaptain/getCaptainDetailsByEmailOrIDOrPhone.php";
|
||||
static String getCaptainDetails = "$server/Admin/AdminCaptain/get.php";
|
||||
static String getRidesPerMonth =
|
||||
static String get getCaptainDetails => "$server/Admin/AdminCaptain/get.php";
|
||||
static String get getRidesPerMonth =>
|
||||
"$server/Admin/AdminRide/getRidesPerMonth.php";
|
||||
static String getRidesDetails = "$server/Admin/AdminRide/get.php";
|
||||
static String get getRidesDetails => "$server/Admin/AdminRide/get.php";
|
||||
|
||||
//////////Sms egypt///////////
|
||||
static String sendSms = "https://sms.kazumi.me/api/sms/send-sms";
|
||||
static String senddlr = "https://sms.kazumi.me/api/sms/send-dlr";
|
||||
static String sendvalidity = "https://sms.kazumi.me/api/sms/send-validity";
|
||||
static String sendmany = "https://sms.kazumi.me/api/sms/send-many";
|
||||
static String checkCredit = "https://sms.kazumi.me/api/sms/check-credit";
|
||||
static String checkStatus = "https://sms.kazumi.me/api/sms/check-status";
|
||||
static String getSender = "$server/auth/sms/getSender.php";
|
||||
static String updatePhoneInvalidSMS =
|
||||
static String get sendSms => "https://sms.kazumi.me/api/sms/send-sms";
|
||||
static String get senddlr => "https://sms.kazumi.me/api/sms/send-dlr";
|
||||
static String get sendvalidity => "https://sms.kazumi.me/api/sms/send-validity";
|
||||
static String get sendmany => "https://sms.kazumi.me/api/sms/send-many";
|
||||
static String get checkCredit => "https://sms.kazumi.me/api/sms/check-credit";
|
||||
static String get checkStatus => "https://sms.kazumi.me/api/sms/check-status";
|
||||
static String get getSender => "$server/auth/sms/getSender.php";
|
||||
static String get updatePhoneInvalidSMS =>
|
||||
"$server/auth/sms/updatePhoneInvalidSMS.php";
|
||||
|
||||
//////////////service///////////
|
||||
|
||||
static String serviceApp = "$server/serviceapp";
|
||||
static String getComplaintAllData = "$serviceApp/getComplaintAllData.php";
|
||||
static String getComplaintAllDataForDriver =
|
||||
static String get serviceApp => "$server/serviceapp";
|
||||
static String get getComplaintAllData => "$serviceApp/getComplaintAllData.php";
|
||||
static String get getComplaintAllDataForDriver =>
|
||||
"$serviceApp/getComplaintAllDataForDriver.php";
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:siro_driver/constant/currency.dart';
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
@@ -10,6 +11,8 @@ import 'package:siro_driver/constant/box_name.dart';
|
||||
import 'package:siro_driver/constant/links.dart';
|
||||
import 'package:siro_driver/controller/functions/crud.dart';
|
||||
import 'package:siro_driver/controller/home/payment/captain_wallet_controller.dart';
|
||||
import 'package:siro_driver/print.dart';
|
||||
import 'package:siro_driver/controller/functions/country_logic.dart';
|
||||
import 'package:siro_driver/main.dart';
|
||||
import 'package:siro_driver/views/widgets/error_snakbar.dart';
|
||||
import 'package:siro_driver/views/widgets/mydialoug.dart';
|
||||
@@ -299,7 +302,7 @@ Download the Siro app now and enjoy your ride!
|
||||
/// **FIX**: Added the missing 'selectPhone' method.
|
||||
void selectPhone(String phone) {
|
||||
// Format the selected phone number and update the text field.
|
||||
invitePhoneController.text = _formatSyrianPhoneNumber(phone);
|
||||
invitePhoneController.text = CountryLogic.formatCurrentCountryPhone(phone);
|
||||
update();
|
||||
Get.back(); // Close the contacts dialog after selection.
|
||||
}
|
||||
@@ -357,30 +360,30 @@ Download the Siro app now and enjoy your ride!
|
||||
if ((driverInvitationData[index]['isGiftToken']).toString() ==
|
||||
'0') {
|
||||
Get.back();
|
||||
await CRUD().post(
|
||||
link: AppLink.updateInviteDriver,
|
||||
payload: {'id': (driverInvitationData[index]['id'])});
|
||||
await Get.find<CaptainWalletController>().addDriverPayment(
|
||||
'paymentMethod',
|
||||
('500'),
|
||||
'',
|
||||
// Server-side claim validation
|
||||
var response = await CRUD().post(
|
||||
link: AppLink.claimInviteReward,
|
||||
payload: {
|
||||
'invite_id': (driverInvitationData[index]['id']).toString(),
|
||||
'driver_id': box.read(BoxName.driverID).toString(),
|
||||
'country_code': box.read(BoxName.countryCode).toString(),
|
||||
}
|
||||
);
|
||||
await Get.find<CaptainWalletController>()
|
||||
.addDriverWalletToInvitor(
|
||||
'paymentMethod',
|
||||
(driverInvitationData[index]['driverInviterId']),
|
||||
('500'),
|
||||
);
|
||||
NotificationCaptainController().addNotificationCaptain(
|
||||
driverInvitationData[index]['driverInviterId'].toString(),
|
||||
"You have got a gift for invitation".tr,
|
||||
'${"You have 500".tr} ${'SYP'.tr}',
|
||||
false);
|
||||
NotificationController().showNotification(
|
||||
"You have got a gift for invitation".tr,
|
||||
'${"You have 500".tr} ${'SYP'.tr}',
|
||||
'tone1',
|
||||
'');
|
||||
|
||||
if (response != 'failure') {
|
||||
var data = jsonDecode(response);
|
||||
if (data['status'] == 'success') {
|
||||
NotificationController().showNotification(
|
||||
"You have got a gift for invitation".tr,
|
||||
'${"You have 500".tr} ${CurrencyHelper.currency}',
|
||||
'tone1',
|
||||
'');
|
||||
// refresh stats
|
||||
fetchDriverStats();
|
||||
} else {
|
||||
mySnackeBarError(data['message'] ?? 'Claim failed'.tr);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Get.back();
|
||||
MyDialog().getDialog("You have got a gift".tr,
|
||||
@@ -440,7 +443,7 @@ Download the Siro app now and enjoy your ride!
|
||||
driverInvitationDataToPassengers[index]['passengerInviterId']
|
||||
.toString(),
|
||||
"You have got a gift for invitation".tr,
|
||||
'${"You have 200".tr} ${'SYP'.tr}',
|
||||
'${"You have 200".tr} ${CurrencyHelper.currency}',
|
||||
false,
|
||||
);
|
||||
} else {
|
||||
@@ -465,47 +468,7 @@ Download the Siro app now and enjoy your ride!
|
||||
);
|
||||
}
|
||||
|
||||
/// Formats a phone number to the standard Syrian international format (+963...).
|
||||
String _formatSyrianPhoneNumber(String input) {
|
||||
String digitsOnly = input.replaceAll(RegExp(r'\D'), '');
|
||||
|
||||
if (digitsOnly.startsWith('09') && digitsOnly.length == 10) {
|
||||
return '963${digitsOnly.substring(1)}';
|
||||
}
|
||||
if (digitsOnly.length == 9 && digitsOnly.startsWith('9')) {
|
||||
return '963$digitsOnly';
|
||||
}
|
||||
return input; // Fallback for unrecognized formats
|
||||
}
|
||||
|
||||
String normalizeSyrianPhone(String input) {
|
||||
String phone = input.trim();
|
||||
|
||||
// احذف كل شيء غير أرقام
|
||||
phone = phone.replaceAll(RegExp(r'[^0-9]'), '');
|
||||
|
||||
// إذا يبدأ بـ 0 → احذفها
|
||||
if (phone.startsWith('0')) {
|
||||
phone = phone.substring(1);
|
||||
}
|
||||
|
||||
// إذا يبدأ بـ 963 مكررة → احذف التكرار
|
||||
while (phone.startsWith('963963')) {
|
||||
phone = phone.substring(3);
|
||||
}
|
||||
|
||||
// إذا يبدأ بـ 963 ولكن داخله كمان 963 → خليه مرة واحدة فقط
|
||||
if (phone.startsWith('963') && phone.length > 12) {
|
||||
phone = phone.substring(phone.length - 9); // آخر 9 أرقام
|
||||
}
|
||||
|
||||
// الآن إذا كان بلا 963 → أضفها
|
||||
if (!phone.startsWith('963')) {
|
||||
phone = '963' + phone;
|
||||
}
|
||||
|
||||
return phone;
|
||||
}
|
||||
// removed normalizeSyrianPhone
|
||||
|
||||
/// Sends an invitation to a potential new driver.
|
||||
void sendInvite() async {
|
||||
@@ -513,9 +476,8 @@ Download the Siro app now and enjoy your ride!
|
||||
mySnackeBarError('Please enter a phone number'.tr);
|
||||
return;
|
||||
}
|
||||
// Format Syrian phone number: remove leading 0 and add +963
|
||||
String formattedPhoneNumber =
|
||||
normalizeSyrianPhone(invitePhoneController.text);
|
||||
CountryLogic.formatCurrentCountryPhone(invitePhoneController.text);
|
||||
if (formattedPhoneNumber.length != 12) {
|
||||
mySnackeBarError('Please enter a correct phone'.tr);
|
||||
return;
|
||||
@@ -553,12 +515,7 @@ Download the Siro app now and enjoy your ride!
|
||||
return;
|
||||
}
|
||||
|
||||
// Format Syrian phone number: remove leading 0 and add +963
|
||||
String formattedPhoneNumber = invitePhoneController.text.trim();
|
||||
if (formattedPhoneNumber.startsWith('0')) {
|
||||
formattedPhoneNumber = formattedPhoneNumber.substring(1);
|
||||
}
|
||||
formattedPhoneNumber = '+963$formattedPhoneNumber';
|
||||
String formattedPhoneNumber = CountryLogic.formatCurrentCountryPhone(invitePhoneController.text);
|
||||
|
||||
if (formattedPhoneNumber.length < 12) {
|
||||
// +963 + 9 digits = 12+
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:siro_driver/controller/functions/crud.dart';
|
||||
import 'package:siro_driver/print.dart';
|
||||
import 'package:siro_driver/views/home/on_boarding_page.dart';
|
||||
import 'package:siro_driver/views/widgets/error_snakbar.dart';
|
||||
import 'package:siro_driver/controller/functions/country_logic.dart';
|
||||
|
||||
import '../../../constant/box_name.dart';
|
||||
import '../../../constant/links.dart';
|
||||
@@ -18,69 +19,12 @@ class PhoneAuthHelper {
|
||||
static final String _sendOtpUrl = '${_baseUrl}sendWhatsAppDriver.php';
|
||||
static final String _verifyOtpUrl = '${_baseUrl}verifyOtp.php';
|
||||
static final String _registerUrl = '${_baseUrl}register_driver.php';
|
||||
static String formatSyrianPhone(String phone) {
|
||||
// Remove spaces, symbols, +, -, ()
|
||||
phone = phone.replaceAll(RegExp(r'[ \-\(\)\+]'), '').trim();
|
||||
|
||||
// Normalize 00963 → 963
|
||||
if (phone.startsWith('00963')) {
|
||||
phone = phone.replaceFirst('00963', '963');
|
||||
}
|
||||
|
||||
// Normalize 0963 → 963
|
||||
if (phone.startsWith('0963')) {
|
||||
phone = phone.replaceFirst('0963', '963');
|
||||
}
|
||||
if (phone.startsWith('096309')) {
|
||||
phone = phone.replaceFirst('096309', '963');
|
||||
}
|
||||
|
||||
// NEW: Fix 96309xxxx → 9639xxxx
|
||||
if (phone.startsWith('96309')) {
|
||||
phone = '9639' + phone.substring(5); // remove the "0" after 963
|
||||
}
|
||||
|
||||
// If starts with 9630 → correct to 9639
|
||||
if (phone.startsWith('9630')) {
|
||||
phone = '9639' + phone.substring(4);
|
||||
}
|
||||
|
||||
// If already in correct format: 9639xxxxxxxx
|
||||
if (phone.startsWith('9639') && phone.length == 12) {
|
||||
return phone;
|
||||
}
|
||||
|
||||
// If starts with 963 but missing the 9
|
||||
if (phone.startsWith('963') && phone.length > 3) {
|
||||
// Ensure it begins with 9639
|
||||
if (!phone.startsWith('9639')) {
|
||||
phone = '9639' + phone.substring(3);
|
||||
}
|
||||
return phone;
|
||||
}
|
||||
|
||||
// If starts with 09xxxxxxxx → 9639xxxxxxxx
|
||||
if (phone.startsWith('09')) {
|
||||
return '963' + phone.substring(1);
|
||||
}
|
||||
|
||||
// If 9xxxxxxxx (9 digits)
|
||||
if (phone.startsWith('9') && phone.length == 9) {
|
||||
return '963' + phone;
|
||||
}
|
||||
|
||||
// If starts with incorrect 0xxxxxxx → assume Syrian and fix
|
||||
if (phone.startsWith('0') && phone.length == 10) {
|
||||
return '963' + phone.substring(1);
|
||||
}
|
||||
|
||||
return phone;
|
||||
}
|
||||
// removed formatSyrianPhone
|
||||
|
||||
/// Sends an OTP to the provided phone number.
|
||||
static Future<bool> sendOtp(String phoneNumber) async {
|
||||
try {
|
||||
final fixedPhone = formatSyrianPhone(phoneNumber);
|
||||
final fixedPhone = CountryLogic.formatCurrentCountryPhone(phoneNumber);
|
||||
Log.print('fixedPhone: $fixedPhone');
|
||||
|
||||
final response = await CRUD().post(
|
||||
@@ -112,7 +56,7 @@ class PhoneAuthHelper {
|
||||
/// Verifies the OTP and logs the user in.
|
||||
static Future<void> verifyOtp(String phoneNumber, String otpCode) async {
|
||||
try {
|
||||
final fixedPhone = formatSyrianPhone(phoneNumber);
|
||||
final fixedPhone = CountryLogic.formatCurrentCountryPhone(phoneNumber);
|
||||
Log.print('fixedPhone: $fixedPhone');
|
||||
final response = await CRUD().post(
|
||||
link: _verifyOtpUrl,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:siro_driver/constant/currency.dart';
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
@@ -108,7 +109,7 @@ class NotificationController extends GetxController {
|
||||
|
||||
// تنسيق النص ليكون 4 أسطر واضحة
|
||||
formattedBigText = "👤 $paxName\n"
|
||||
"💰 $price ${'SYP'.tr} | 🛣️ $distance كم\n"
|
||||
"💰 $price ${CurrencyHelper.currency} | 🛣️ $distance كم\n"
|
||||
"🟢 من: $startLoc\n"
|
||||
"🏁 إلى: $endLoc";
|
||||
|
||||
|
||||
94
siro_driver/lib/controller/functions/country_logic.dart
Normal file
94
siro_driver/lib/controller/functions/country_logic.dart
Normal file
@@ -0,0 +1,94 @@
|
||||
import 'package:siro_driver/constant/box_name.dart';
|
||||
import 'package:siro_driver/main.dart';
|
||||
|
||||
class CountryLogic {
|
||||
/// Formats the phone number based on the country's dialing rules.
|
||||
static String formatPhone(String phone, String country) {
|
||||
phone = phone.replaceAll(RegExp(r'[ \-\(\)\+]'), '').trim();
|
||||
|
||||
if (country == 'Egypt') {
|
||||
// Rule: 010, 011, 012, 015 -> 2010, 2011, 2012, 2015
|
||||
if (phone.startsWith('0020')) phone = phone.replaceFirst('0020', '20');
|
||||
if (phone.startsWith('01') && phone.length >= 10) {
|
||||
return '20${phone.substring(1)}';
|
||||
}
|
||||
if (phone.startsWith('1') &&
|
||||
phone.length >= 9 &&
|
||||
!phone.startsWith('20')) {
|
||||
return '20$phone';
|
||||
}
|
||||
if (!phone.startsWith('20') && phone.length > 8) return '20$phone';
|
||||
} else if (country == 'Jordan') {
|
||||
// Rule: 07x -> 9627x
|
||||
if (phone.startsWith('00962')) phone = phone.replaceFirst('00962', '962');
|
||||
if (phone.startsWith('07') && phone.length >= 9) {
|
||||
return '962${phone.substring(1)}';
|
||||
}
|
||||
if (phone.startsWith('7') &&
|
||||
phone.length >= 8 &&
|
||||
!phone.startsWith('962')) {
|
||||
return '962$phone';
|
||||
}
|
||||
if (!phone.startsWith('962') && phone.length > 7) return '962$phone';
|
||||
} else {
|
||||
// Default to Syria
|
||||
if (phone.startsWith('00963')) phone = phone.replaceFirst('00963', '963');
|
||||
if (phone.startsWith('0963')) phone = phone.replaceFirst('0963', '963');
|
||||
if (phone.startsWith('096309')) {
|
||||
phone = phone.replaceFirst('096309', '963');
|
||||
}
|
||||
if (phone.startsWith('96309')) phone = '9639${phone.substring(5)}';
|
||||
if (phone.startsWith('9630')) phone = '9639${phone.substring(4)}';
|
||||
if (phone.startsWith('9639') && phone.length == 12) return phone;
|
||||
if (phone.startsWith('963') &&
|
||||
phone.length > 3 &&
|
||||
!phone.startsWith('9639')) {
|
||||
phone = '9639${phone.substring(3)}';
|
||||
}
|
||||
if (phone.startsWith('09')) return '963${phone.substring(1)}';
|
||||
if (phone.startsWith('9') && phone.length == 9) return '963$phone';
|
||||
if (phone.startsWith('0') && phone.length == 10) {
|
||||
return '963${phone.substring(1)}';
|
||||
}
|
||||
}
|
||||
return phone;
|
||||
}
|
||||
|
||||
/// Returns the default country prefix (EG, JO, SY) for UI initial selection.
|
||||
static String getCountryPrefix(String country) {
|
||||
if (country == 'Egypt') return 'EG';
|
||||
if (country == 'Jordan') return 'JO';
|
||||
return 'SY';
|
||||
}
|
||||
|
||||
/// Returns the default emergency number for the country.
|
||||
static String getEmergencyNumber(String country) {
|
||||
if (country == 'Egypt') return '122';
|
||||
if (country == 'Jordan') return '911';
|
||||
return '112'; // Syria
|
||||
}
|
||||
|
||||
/// Returns the hint text for phone inputs based on the country.
|
||||
static String getPhoneHint(String country) {
|
||||
if (country == 'Egypt') return 'e.g. 01012345678 (Default +20)';
|
||||
if (country == 'Jordan') return 'e.g. 0791234567 (Default +962)';
|
||||
return 'e.g. 0912345678 (Default +963)'; // Syria
|
||||
}
|
||||
|
||||
/// Helper to format phone using the current country in box.
|
||||
static String formatCurrentCountryPhone(String phone) {
|
||||
String cleanPhone = phone.replaceAll(RegExp(r'[ \-\(\)]'), '').trim();
|
||||
if (cleanPhone.startsWith('+963') || cleanPhone.startsWith('00963')) {
|
||||
return formatPhone(cleanPhone, 'Syria');
|
||||
}
|
||||
if (cleanPhone.startsWith('+20') || cleanPhone.startsWith('0020')) {
|
||||
return formatPhone(cleanPhone, 'Egypt');
|
||||
}
|
||||
if (cleanPhone.startsWith('+962') || cleanPhone.startsWith('00962')) {
|
||||
return formatPhone(cleanPhone, 'Jordan');
|
||||
}
|
||||
|
||||
final country = box.read(BoxName.countryCode) ?? 'Syria';
|
||||
return formatPhone(cleanPhone, country);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'dart:io';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:siro_driver/views/widgets/error_snakbar.dart';
|
||||
import 'package:siro_driver/controller/functions/country_logic.dart';
|
||||
|
||||
void showInBrowser(String url) async {
|
||||
if (await canLaunchUrl(Uri.parse(url))) {
|
||||
@@ -10,18 +9,11 @@ void showInBrowser(String url) async {
|
||||
}
|
||||
|
||||
String cleanAndFormatPhoneNumber(String phoneNumber) {
|
||||
// 1. Clean the number
|
||||
String formattedNumber = phoneNumber.replaceAll(RegExp(r'\s+'), '');
|
||||
|
||||
// 2. Format logic (Syria/Egypt/International)
|
||||
if (formattedNumber.length > 6) {
|
||||
if (formattedNumber.startsWith('09')) {
|
||||
formattedNumber = '+963${formattedNumber.substring(1)}';
|
||||
} else if (formattedNumber.startsWith('01') && formattedNumber.length == 11) {
|
||||
formattedNumber = '+20${formattedNumber.substring(1)}';
|
||||
} else if (formattedNumber.startsWith('00')) {
|
||||
formattedNumber = '+${formattedNumber.substring(2)}';
|
||||
} else if (!formattedNumber.startsWith('+')) {
|
||||
formattedNumber = CountryLogic.formatCurrentCountryPhone(formattedNumber);
|
||||
if (!formattedNumber.startsWith('+')) {
|
||||
formattedNumber = '+$formattedNumber';
|
||||
}
|
||||
}
|
||||
@@ -30,11 +22,6 @@ String cleanAndFormatPhoneNumber(String phoneNumber) {
|
||||
|
||||
Future<void> makePhoneCall(String phoneNumber) async {
|
||||
String formattedNumber = cleanAndFormatPhoneNumber(phoneNumber);
|
||||
|
||||
if (!formattedNumber.startsWith('+963')) {
|
||||
mySnackeBarError("Calling non-Syrian numbers is not supported".tr);
|
||||
return;
|
||||
}
|
||||
|
||||
// Create URI directly from String to avoid double encoding '+' as '%2B'
|
||||
final Uri launchUri = Uri.parse('tel:$formattedNumber');
|
||||
@@ -63,10 +50,6 @@ void launchCommunication(
|
||||
if (Platform.isIOS) {
|
||||
switch (method) {
|
||||
case 'phone':
|
||||
if (!formattedContact.startsWith('+963')) {
|
||||
mySnackeBarError("Calling non-Syrian numbers is not supported".tr);
|
||||
return;
|
||||
}
|
||||
url = 'tel:$formattedContact';
|
||||
break;
|
||||
case 'sms':
|
||||
@@ -86,10 +69,6 @@ void launchCommunication(
|
||||
} else if (Platform.isAndroid) {
|
||||
switch (method) {
|
||||
case 'phone':
|
||||
if (!formattedContact.startsWith('+963')) {
|
||||
mySnackeBarError("Calling non-Syrian numbers is not supported".tr);
|
||||
return;
|
||||
}
|
||||
url = 'tel:$formattedContact';
|
||||
break;
|
||||
case 'sms':
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:siro_driver/constant/currency.dart';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:siro_driver/constant/links.dart';
|
||||
@@ -35,7 +36,7 @@ Future<void> showDriverGiftClaim(BuildContext context) async {
|
||||
if (box.read(BoxName.is_claimed).toString() == '0' ||
|
||||
box.read(BoxName.is_claimed) == null) {
|
||||
MyDialog().getDialog(
|
||||
'You have gift 300 SYP'.tr, 'This for new registration'.tr, () async {
|
||||
'You have gift 300 ${CurrencyHelper.currency}'.tr, 'This for new registration'.tr, () async {
|
||||
Get.back();
|
||||
var res = await CRUD().post(link: AppLink.updateDriverClaim, payload: {
|
||||
'driverId': box.read(BoxName.driverID),
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:siro_driver/constant/currency.dart';
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -97,7 +98,7 @@ class ChallengesController extends GetxController {
|
||||
id: 'daily_earnings',
|
||||
titleEn: 'Money Maker',
|
||||
titleAr: 'صانع المال',
|
||||
descriptionEn: 'Earn 3000 SYP today',
|
||||
descriptionEn: 'Earn 3000 ${CurrencyHelper.currency} today',
|
||||
descriptionAr: 'اربح 3000 ل.س اليوم',
|
||||
icon: Icons.monetization_on_rounded,
|
||||
color: const Color(0xFF4CAF50),
|
||||
@@ -140,7 +141,7 @@ class ChallengesController extends GetxController {
|
||||
id: 'weekly_earnings',
|
||||
titleEn: 'Big Earner',
|
||||
titleAr: 'الربح الكبير',
|
||||
descriptionEn: 'Earn 20,000 SYP this week',
|
||||
descriptionEn: 'Earn 20,000 ${CurrencyHelper.currency} this week',
|
||||
descriptionAr: 'اربح 20,000 ل.س هذا الأسبوع',
|
||||
icon: Icons.account_balance_wallet_rounded,
|
||||
color: const Color(0xFF9C27B0),
|
||||
|
||||
@@ -1395,6 +1395,8 @@ class MyTranslation extends Translations {
|
||||
"SOS Phone": "هاتف الطوارئ",
|
||||
"SUBMIT": "إرسال",
|
||||
"SYP": "ل.س",
|
||||
"EGP": "ج.م",
|
||||
"JOD": "د.أ",
|
||||
"Safety & Security": "السلامة والأمان",
|
||||
"Saudi Arabia": "السعودية",
|
||||
"Save": "حفظ",
|
||||
@@ -2078,7 +2080,11 @@ class MyTranslation extends Translations {
|
||||
"You have finished all times": "خلصت كل الأوقات",
|
||||
"You have gift 300 L.E": "عندك هدية 300 ل.م",
|
||||
"You have gift 300 SYP": "عندك هدية 300 ل.س",
|
||||
"You have gift 300 EGP": "عندك هدية 300 ج.م",
|
||||
"You have gift 300 JOD": "عندك هدية 300 د.أ",
|
||||
"You have gift 30000 SYP": "عندك هدية 30000 ل.س",
|
||||
"You have gift 30000 EGP": "عندك هدية 30000 ج.م",
|
||||
"You have gift 30000 JOD": "عندك هدية 30000 د.أ",
|
||||
"You have got a gift": "وصلتك هدية",
|
||||
"You have got a gift for invitation": "وصلتك هدية للدعوة",
|
||||
"You have in account": "عندك بالحساب",
|
||||
@@ -2608,6 +2614,8 @@ class MyTranslation extends Translations {
|
||||
"Confirm": "تأكيد",
|
||||
"PTS": "نقطة",
|
||||
"SYP": "ل.س",
|
||||
"EGP": "ج.م",
|
||||
"JOD": "د.أ",
|
||||
"You are buying": "أنت تقوم بشراء",
|
||||
"for": "بـ",
|
||||
"Points": "نقاط",
|
||||
@@ -2634,6 +2642,8 @@ class MyTranslation extends Translations {
|
||||
"اختر كيف تريد شحن حسابك",
|
||||
"Add Balance": "إضافة رصيد",
|
||||
"SYP": "ل.س",
|
||||
"EGP": "ج.م",
|
||||
"JOD": "د.أ",
|
||||
"Your completed trips will appear here": "ستظهر رحلاتك المكتملة هنا",
|
||||
"Cancelled by Passenger": "تم الإلغاء بواسطة الراكب",
|
||||
},
|
||||
|
||||
13585
siro_driver/lib/env/env.g.dart
vendored
13585
siro_driver/lib/env/env.g.dart
vendored
File diff suppressed because it is too large
Load Diff
@@ -800,6 +800,8 @@
|
||||
"Select Payment Method": "Select Payment Method",
|
||||
"You are buying": "You are buying",
|
||||
"Points": "SYP",
|
||||
"Points": "EGP",
|
||||
"Points": "JOD",
|
||||
"for": "for",
|
||||
"Use Touch ID or Face ID to confirm payment": "Use Touch ID or Face ID to confirm payment",
|
||||
"Your Budget less than needed": "Your Budget less than needed",
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user