feat: add Nabeh payment verification proxy and update UI components

This commit is contained in:
Hamza-Ayed
2026-07-11 22:14:37 +03:00
parent de761c1d97
commit 83f5bf516b
5 changed files with 74 additions and 10 deletions
+5 -2
View File
@@ -9,6 +9,7 @@ import '../../controller/local/phone_intel/intl_phone_field.dart';
import '../../controller/functions/country_logic.dart';
import '../../constant/box_name.dart';
import '../../main.dart';
import '../home/map_widget.dart/left_main_menu_icons.dart';
// ─────────────────────────────────────────────────────────────────────────────
// SHARED DESIGN TOKENS
@@ -488,7 +489,8 @@ class _PhoneNumberScreenState extends State<PhoneNumberScreen> {
const BorderSide(color: Color(0xFFEF4444), width: 1.5),
),
),
initialCountryCode: CountryLogic.getCountryPrefix(box.read(BoxName.countryCode) ?? 'Syria'),
initialCountryCode: CountryLogic.getCountryPrefix(
box.read(BoxName.countryCode) ?? 'Syria'),
onChanged: (phone) {
_phoneController.text = phone.completeNumber;
},
@@ -540,7 +542,8 @@ class _OtpVerificationScreenState extends State<OtpVerificationScreen> {
void _submit() async {
if (_formKey.currentState!.validate()) {
setState(() => _isLoading = true);
await PhoneAuthHelper.verifyOtp(widget.phoneNumber, _otpController.text.trim());
await PhoneAuthHelper.verifyOtp(
widget.phoneNumber, _otpController.text.trim());
if (mounted) setState(() => _isLoading = false);
}
}
@@ -63,14 +63,18 @@ final Map<String, CarType> _carTypeCatalog = {
carType: 'Awfar Car',
carDetail: 'Old and affordable'.tr,
image: 'assets/images/balash.png'),
'Mishwar Vip': CarType(
carType: 'Mishwar Vip',
carDetail: 'Perfect for passengers seeking the latest car models'.tr,
image: 'assets/images/jeep.png'),
};
// ترتيب وتوفر أنواع السيارات حسب الدولة (بدون "Rayeh Gai" لأنها تُضاف
// تلقائياً حسب مسافة الرحلة بغض النظر عن الدولة).
const Map<String, List<String>> _carTypesByCountry = {
'Jordan': ['Fixed Price', 'Comfort', 'Electric', 'Lady'],
'Egypt': ['Fixed Price', 'Comfort', 'Lady', 'Scooter', 'Awfar Car'],
'Syria': ['Fixed Price', 'Comfort', 'Electric', 'Lady', 'Van'],
'Jordan': ['Fixed Price', 'Comfort', 'Mishwar Vip', 'Electric', 'Lady'],
'Egypt': ['Fixed Price', 'Comfort', 'Mishwar Vip', 'Lady', 'Scooter', 'Awfar Car'],
'Syria': ['Fixed Price', 'Comfort', 'Mishwar Vip', 'Electric', 'Lady', 'Van'],
};
List<CarType> _carTypesForCountry(String country) {
@@ -69,11 +69,11 @@ GetBuilder<MapEngineController> leftMainMenuIcons() {
tooltip: 'VIP Waiting Page',
onPressed: () => Get.to(() => VipWaittingPage()),
),
_buildMapActionButton(
icon: Icons.explore,
tooltip: 'Test Page',
onPressed: () => Get.to(() => TestPage()),
),
// _buildMapActionButton(
// icon: Icons.explore,
// tooltip: 'Test Page',
// onPressed: () => Get.to(() => TestPage()),
// ),
],
),
),