2026-03-3-1
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB |
BIN
ios/RideWidget/Assets.xcassets/IntaleqIcon.imageset/152 1.png
vendored
Normal file
BIN
ios/RideWidget/Assets.xcassets/IntaleqIcon.imageset/152 1.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
ios/RideWidget/Assets.xcassets/IntaleqIcon.imageset/152 2.png
vendored
Normal file
BIN
ios/RideWidget/Assets.xcassets/IntaleqIcon.imageset/152 2.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
ios/RideWidget/Assets.xcassets/IntaleqIcon.imageset/152.png
vendored
Normal file
BIN
ios/RideWidget/Assets.xcassets/IntaleqIcon.imageset/152.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"filename" : "1024.png",
|
"filename" : "152.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "1024 1.png",
|
"filename" : "152 1.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "1024 2.png",
|
"filename" : "152 2.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class AppLink {
|
|||||||
/// هذا الرابط خاص برحلات الركاب، ويستخدمه السيرفر الجانبي للرحلات (Ride Server Side) للتعامل مع عمليات إلغاء الرحلات وتحديث حالة الرحلات وغيرها من العمليات المتعلقة بالرحلات.
|
/// هذا الرابط خاص برحلات الركاب، ويستخدمه السيرفر الجانبي للرحلات (Ride Server Side) للتعامل مع عمليات إلغاء الرحلات وتحديث حالة الرحلات وغيرها من العمليات المتعلقة بالرحلات.
|
||||||
/// https://routesy.intaleq.xyz for syria
|
/// https://routesy.intaleq.xyz for syria
|
||||||
/// for jordan https://routesjo.intaleq.xyz
|
/// for jordan https://routesjo.intaleq.xyz
|
||||||
static String routesOsm = 'https://routesjo.intaleq.xyz';
|
static String routesOsm = 'https://routesy.intaleq.xyz';
|
||||||
|
|
||||||
///https://location.intaleq.xyz/intaleq/ride/location
|
///https://location.intaleq.xyz/intaleq/ride/location
|
||||||
///locationServerSide هو السيرفر الجانبي الخاص بموقع السائقين، حيث يتم إرسال تحديثات الموقع من التطبيق إلى هذا السيرفر، ومن ثم يقوم هذا السيرفر بتوزيع هذه التحديثات إلى الركاب المتصلين الذين يتابعون السائق في الوقت الحقيقي.
|
///locationServerSide هو السيرفر الجانبي الخاص بموقع السائقين، حيث يتم إرسال تحديثات الموقع من التطبيق إلى هذا السيرفر، ومن ثم يقوم هذا السيرفر بتوزيع هذه التحديثات إلى الركاب المتصلين الذين يتابعون السائق في الوقت الحقيقي.
|
||||||
|
|||||||
@@ -765,6 +765,7 @@ class MapPassengerController extends GetxController {
|
|||||||
IosLiveActivityService.endRideActivity(); // ✅ أضف هذا السطر
|
IosLiveActivityService.endRideActivity(); // ✅ أضف هذا السطر
|
||||||
_isCancelProcessed = false;
|
_isCancelProcessed = false;
|
||||||
currentRideState.value = RideState.noRide;
|
currentRideState.value = RideState.noRide;
|
||||||
|
resetAllMapStates();
|
||||||
Get.offAll(() => const MapPagePassenger());
|
Get.offAll(() => const MapPagePassenger());
|
||||||
|
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
@@ -2116,20 +2117,18 @@ class MapPassengerController extends GetxController {
|
|||||||
update();
|
update();
|
||||||
} else {
|
} else {
|
||||||
var res = placesDestination[index];
|
var res = placesDestination[index];
|
||||||
|
|
||||||
// استخراج الاسم من displayName.text أو بديله
|
|
||||||
hintTextDestinationPoint = res['displayName']?['text'] ??
|
hintTextDestinationPoint = res['displayName']?['text'] ??
|
||||||
res['formattedAddress'] ??
|
res['formattedAddress'] ??
|
||||||
'Unknown Place';
|
'Unknown Place';
|
||||||
|
|
||||||
// استخراج الإحداثيات
|
|
||||||
double? lat = res['location']?['latitude'];
|
double? lat = res['location']?['latitude'];
|
||||||
double? lng = res['location']?['longitude'];
|
double? lng = res['location']?['longitude'];
|
||||||
|
|
||||||
if (lat != null && lng != null) {
|
if (lat != null && lng != null) {
|
||||||
newMyLocation = LatLng(lat, lng);
|
newMyLocation = LatLng(lat, lng);
|
||||||
|
// 🔥 الحل: تحريك الكاميرا فوراً للهدف حتى لا يتم مسحه عند إغلاق الكيبورد 🔥
|
||||||
|
mapController
|
||||||
|
?.animateCamera(CameraUpdate.newLatLngZoom(newMyLocation, 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2141,6 +2140,8 @@ class MapPassengerController extends GetxController {
|
|||||||
double lng = recentLocations[index]['longitude'];
|
double lng = recentLocations[index]['longitude'];
|
||||||
newMyLocation = LatLng(lat, lng);
|
newMyLocation = LatLng(lat, lng);
|
||||||
|
|
||||||
|
// 🔥 تحريك الكاميرا فوراً 🔥
|
||||||
|
mapController?.animateCamera(CameraUpdate.newLatLngZoom(newMyLocation, 16));
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2517,7 +2518,7 @@ class MapPassengerController extends GetxController {
|
|||||||
// 1. تحديث الآيفون (Live Activity): يمكن تحديثه كل 5 ثواني لأنه "تحديث صامت" للشاشة فقط ولا يصدر صوتاً
|
// 1. تحديث الآيفون (Live Activity): يمكن تحديثه كل 5 ثواني لأنه "تحديث صامت" للشاشة فقط ولا يصدر صوتاً
|
||||||
if (remainingSeconds % 5 == 0 || remainingSeconds == 0) {
|
if (remainingSeconds % 5 == 0 || remainingSeconds == 0) {
|
||||||
IosLiveActivityService.updateRideActivity(
|
IosLiveActivityService.updateRideActivity(
|
||||||
status: 'inProgress', // الحالة تتغير هنا إلى جارية
|
status: 'ongoing', // ['waiting', 'ongoing']
|
||||||
driverName: driverName ?? '',
|
driverName: driverName ?? '',
|
||||||
carDetails: '$make • $model • $carColor',
|
carDetails: '$make • $model • $carColor',
|
||||||
etaText: stringRemainingTimeRideBegin,
|
etaText: stringRemainingTimeRideBegin,
|
||||||
@@ -2734,7 +2735,7 @@ class MapPassengerController extends GetxController {
|
|||||||
|
|
||||||
// إيقاف التايمرات
|
// إيقاف التايمرات
|
||||||
stopAllTimers();
|
stopAllTimers();
|
||||||
|
resetAllMapStates();
|
||||||
clearPolyline();
|
clearPolyline();
|
||||||
clearMarkersExceptStartEnd();
|
clearMarkersExceptStartEnd();
|
||||||
markers.clear();
|
markers.clear();
|
||||||
@@ -4862,12 +4863,12 @@ Intaleq Team''';
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 3. التنظيف المحلي الفوري (UX Optimization)
|
// 3. التنظيف المحلي الفوري (UX Optimization)
|
||||||
// نقوم بتنظيف الواجهة فوراً ليشعر المستخدم بالاستجابة السريعة
|
|
||||||
Get.back(); // إغلاق الـ BottomSheet
|
Get.back(); // إغلاق الـ BottomSheet
|
||||||
changeCancelRidePageShow(); // إخفاء زر الإلغاء إن وجد
|
if (isCancelRidePageShown)
|
||||||
clearPlacesDestination();
|
changeCancelRidePageShow(); // إخفاء زر الإلغاء إن وجد
|
||||||
clearPolyline();
|
|
||||||
data = [];
|
// 🔥 استدعاء دالة التنظيف الشاملة هنا 🔥
|
||||||
|
resetAllMapStates();
|
||||||
|
|
||||||
// إيقاف جميع التايمرات
|
// إيقاف جميع التايمرات
|
||||||
// إيقاف جميع التايمرات
|
// إيقاف جميع التايمرات
|
||||||
@@ -5551,7 +5552,7 @@ Intaleq Team''';
|
|||||||
|
|
||||||
// تحديث الكاميرا بثروتل
|
// تحديث الكاميرا بثروتل
|
||||||
void onCameraMoveThrottled(CameraPosition pos) {
|
void onCameraMoveThrottled(CameraPosition pos) {
|
||||||
if (_camThrottle?.isActive ?? false) return;
|
_camThrottle?.cancel();
|
||||||
_camThrottle = Timer(const Duration(milliseconds: 160), () {
|
_camThrottle = Timer(const Duration(milliseconds: 160), () {
|
||||||
// ضع فقط المنطق الضروري هنا لتقليل الحمل
|
// ضع فقط المنطق الضروري هنا لتقليل الحمل
|
||||||
int waypointsLength = Get.find<WayPointController>().wayPoints.length;
|
int waypointsLength = Get.find<WayPointController>().wayPoints.length;
|
||||||
@@ -6405,7 +6406,6 @@ Intaleq Team''';
|
|||||||
// 🛑 الفحص الأمني (Sanity Check) - Updated for new format
|
// 🛑 الفحص الأمني (Sanity Check) - Updated for new format
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|
||||||
// البيانات الآن داخل routes[0]
|
|
||||||
if (responseData['routes'] == null || responseData['routes'].isEmpty) {
|
if (responseData['routes'] == null || responseData['routes'].isEmpty) {
|
||||||
if (attemptCount < 2) {
|
if (attemptCount < 2) {
|
||||||
await _retryProcess(origin, destination, waypoints, attemptCount);
|
await _retryProcess(origin, destination, waypoints, attemptCount);
|
||||||
@@ -6426,7 +6426,6 @@ Intaleq Team''';
|
|||||||
double aerialDistance =
|
double aerialDistance =
|
||||||
Geolocator.distanceBetween(startLat, startLng, latDest, lngDest);
|
Geolocator.distanceBetween(startLat, startLng, latDest, lngDest);
|
||||||
|
|
||||||
// الشرط: مسافة السيرفر صفرية أو صغيرة جداً بينما الحقيقية كبيرة
|
|
||||||
if (apiDistanceMeters < 50.0 && aerialDistance > 200.0) {
|
if (apiDistanceMeters < 50.0 && aerialDistance > 200.0) {
|
||||||
Log.print(
|
Log.print(
|
||||||
"⚠️ Suspicious Route detected! Server: $apiDistanceMeters m | Aerial: $aerialDistance m");
|
"⚠️ Suspicious Route detected! Server: $apiDistanceMeters m | Aerial: $aerialDistance m");
|
||||||
@@ -6452,18 +6451,15 @@ Intaleq Team''';
|
|||||||
box.remove(BoxName.tripData);
|
box.remove(BoxName.tripData);
|
||||||
box.write(BoxName.tripData, routeData);
|
box.write(BoxName.tripData, routeData);
|
||||||
|
|
||||||
// duration and distance من routes[0]
|
|
||||||
durationToRide =
|
durationToRide =
|
||||||
((routeData['duration'] as num) * kDurationScalar).toInt();
|
((routeData['duration'] as num) * kDurationScalar).toInt();
|
||||||
double distanceOfTrip = (routeData['distance'] as num) / 1000.0;
|
double distanceOfTrip = (routeData['distance'] as num) / 1000.0;
|
||||||
distance = distanceOfTrip;
|
distance = distanceOfTrip;
|
||||||
|
|
||||||
// steps الآن داخل legs[0].steps
|
|
||||||
data = routeData['legs'] != null && routeData['legs'].isNotEmpty
|
data = routeData['legs'] != null && routeData['legs'].isNotEmpty
|
||||||
? (routeData['legs'][0]['steps'] ?? [])
|
? (routeData['legs'][0]['steps'] ?? [])
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
// معالجة الرسم (Polyline) - الحقل الآن اسمه geometry بدلاً من polyline
|
|
||||||
String pointsString = routeData['geometry'] ?? "";
|
String pointsString = routeData['geometry'] ?? "";
|
||||||
List<LatLng> decodedPoints = [];
|
List<LatLng> decodedPoints = [];
|
||||||
|
|
||||||
@@ -6471,7 +6467,6 @@ Intaleq Team''';
|
|||||||
decodedPoints = await compute(decodePolylineIsolate, pointsString);
|
decodedPoints = await compute(decodePolylineIsolate, pointsString);
|
||||||
}
|
}
|
||||||
|
|
||||||
// حماية إضافية: لو البولي لاين فارغ رغم أن المسافة سليمة
|
|
||||||
if (decodedPoints.isEmpty) {
|
if (decodedPoints.isEmpty) {
|
||||||
_handleFatalError("Map Error".tr, "Received empty route data.".tr);
|
_handleFatalError("Map Error".tr, "Received empty route data.".tr);
|
||||||
return;
|
return;
|
||||||
@@ -6507,7 +6502,6 @@ Intaleq Team''';
|
|||||||
maxLng == null ? point.longitude : max(maxLng, point.longitude);
|
maxLng == null ? point.longitude : max(maxLng, point.longitude);
|
||||||
}
|
}
|
||||||
|
|
||||||
// إغلاق شاشة التحميل بنجاح
|
|
||||||
if (Get.isBottomSheetOpen ?? false) Get.back();
|
if (Get.isBottomSheetOpen ?? false) Get.back();
|
||||||
isDrawingRoute = false;
|
isDrawingRoute = false;
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
@@ -6543,33 +6537,23 @@ Intaleq Team''';
|
|||||||
'$distance ${'KM'.tr} ⌛ ${hours > 0 ? '$hours H $minutes m' : '$minutes m'}'),
|
'$distance ${'KM'.tr} ⌛ ${hours > 0 ? '$hours H $minutes m' : '$minutes m'}'),
|
||||||
));
|
));
|
||||||
|
|
||||||
// 7. رسم الخط (فقط في حال النجاح)
|
// 7. رسم الخط (النظام الجديد لجميع الأجهزة)
|
||||||
if (polyLines.isNotEmpty) clearPolyline();
|
if (polyLines.isNotEmpty) clearPolyline();
|
||||||
bool isLowEndDevice = box.read(BoxName.lowEndMode) ?? true;
|
|
||||||
|
|
||||||
if (isLowEndDevice) {
|
|
||||||
polyLines.add(Polyline(
|
|
||||||
polylineId: const PolylineId('route_solid'),
|
|
||||||
points: polylineCoordinates,
|
|
||||||
width: 6,
|
|
||||||
color: AppColor.primaryColor,
|
|
||||||
endCap: Cap.roundCap,
|
|
||||||
startCap: Cap.roundCap,
|
|
||||||
jointType: JointType.round,
|
|
||||||
));
|
|
||||||
} else {
|
|
||||||
polyLines.addAll(_createGradientPolylines(polylineCoordinates,
|
|
||||||
const Color(0xFF00E5FF), const Color(0xFFFF4081)));
|
|
||||||
}
|
|
||||||
|
|
||||||
rideConfirm = false;
|
rideConfirm = false;
|
||||||
isMarkersShown = true;
|
isMarkersShown = true;
|
||||||
update();
|
update(); // تحديث أولي لإظهار الخريطة والماركرز
|
||||||
|
|
||||||
// إظهار الباتم شيت للسعر
|
// إظهار الباتم شيت للسعر
|
||||||
bottomSheet();
|
bottomSheet();
|
||||||
} catch (e) {
|
|
||||||
// محاولة أخيرة عند حدوث Exception
|
// تشغيل الأنيميشن الخفيف لومضات المسار
|
||||||
|
_playRouteAnimation(polylineCoordinates);
|
||||||
|
} catch (e, stackTrace) {
|
||||||
|
// 🚨 هذا السطر سيفضح المشكلة الحقيقية! 🚨
|
||||||
|
print('🚨 CRITICAL ERROR IN getDirectionMap: $e');
|
||||||
|
print('🚨 STACKTRACE: $stackTrace');
|
||||||
|
|
||||||
if (attemptCount < 2) {
|
if (attemptCount < 2) {
|
||||||
await _retryProcess(origin, destination, waypoints, attemptCount);
|
await _retryProcess(origin, destination, waypoints, attemptCount);
|
||||||
} else {
|
} else {
|
||||||
@@ -6579,6 +6563,64 @@ Intaleq Team''';
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- دالة الأنيميشن الجديدة ---
|
||||||
|
Future<void> _playRouteAnimation(List<LatLng> coords) async {
|
||||||
|
const String routeId = 'route_solid';
|
||||||
|
|
||||||
|
// الألوان المطلوبة (بإمكانك تغيير AppColor.primaryColor إلى ما يناسبك)
|
||||||
|
Color finalColor =
|
||||||
|
AppColor.primaryColor; // اللون النهائي الثابت (مثل الأزرق)
|
||||||
|
Color lightColor = Colors.grey.shade400; // لون التحديث الفاتح (رمادي)
|
||||||
|
Color darkColor = Colors.grey.shade700; // لون التحديث الغامق (رمادي غامق)
|
||||||
|
|
||||||
|
// تكرار العملية 4 مرات لإعطاء تأثير التحميل والتحديث
|
||||||
|
for (int i = 0; i < 4; i++) {
|
||||||
|
// الحالة 1: لون فاتح وعرض أقل
|
||||||
|
polyLines.removeWhere((p) => p.polylineId.value == routeId);
|
||||||
|
polyLines.add(Polyline(
|
||||||
|
polylineId: const PolylineId(routeId),
|
||||||
|
points: coords,
|
||||||
|
width: 5,
|
||||||
|
color: lightColor,
|
||||||
|
endCap: Cap.roundCap,
|
||||||
|
startCap: Cap.roundCap,
|
||||||
|
jointType: JointType.round,
|
||||||
|
zIndex: 1,
|
||||||
|
));
|
||||||
|
update();
|
||||||
|
await Future.delayed(const Duration(milliseconds: 250));
|
||||||
|
|
||||||
|
// الحالة 2: لون غامق وعرض أكبر
|
||||||
|
polyLines.removeWhere((p) => p.polylineId.value == routeId);
|
||||||
|
polyLines.add(Polyline(
|
||||||
|
polylineId: const PolylineId(routeId),
|
||||||
|
points: coords,
|
||||||
|
width: 6,
|
||||||
|
color: darkColor,
|
||||||
|
endCap: Cap.roundCap,
|
||||||
|
startCap: Cap.roundCap,
|
||||||
|
jointType: JointType.round,
|
||||||
|
zIndex: 2,
|
||||||
|
));
|
||||||
|
update();
|
||||||
|
await Future.delayed(const Duration(milliseconds: 250));
|
||||||
|
}
|
||||||
|
|
||||||
|
// بعد الانتهاء من الأنيميشن، يتم تثبيت المسار على اللون الأساسي للتطبيق
|
||||||
|
polyLines.removeWhere((p) => p.polylineId.value == routeId);
|
||||||
|
polyLines.add(Polyline(
|
||||||
|
polylineId: const PolylineId(routeId),
|
||||||
|
points: coords,
|
||||||
|
width: 6,
|
||||||
|
color: finalColor,
|
||||||
|
endCap: Cap.roundCap,
|
||||||
|
startCap: Cap.roundCap,
|
||||||
|
jointType: JointType.round,
|
||||||
|
zIndex: 3,
|
||||||
|
));
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
// --- دالة المساعدة لإعادة المحاولة ---
|
// --- دالة المساعدة لإعادة المحاولة ---
|
||||||
Future<void> _retryProcess(String origin, String dest, List<String> waypoints,
|
Future<void> _retryProcess(String origin, String dest, List<String> waypoints,
|
||||||
int currentAttempt) async {
|
int currentAttempt) async {
|
||||||
@@ -6588,6 +6630,38 @@ Intaleq Team''';
|
|||||||
getDirectionMap(origin, dest, waypoints, currentAttempt + 1);
|
getDirectionMap(origin, dest, waypoints, currentAttempt + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- دالة جديدة لتنظيف الخريطة بالكامل ومنع تداخل الرحلات ---
|
||||||
|
void resetAllMapStates() {
|
||||||
|
Log.print('🧹 Resetting all map states to prevent sticky location bug');
|
||||||
|
|
||||||
|
clearPlacesDestination();
|
||||||
|
clearPlacesStart();
|
||||||
|
clearPolyline();
|
||||||
|
data = [];
|
||||||
|
|
||||||
|
passengerStartLocationFromMap = false;
|
||||||
|
startLocationFromMap = false;
|
||||||
|
isPickerShown = false;
|
||||||
|
workLocationFromMap = false;
|
||||||
|
homeLocationFromMap = false;
|
||||||
|
isAnotherOreder = false;
|
||||||
|
isWhatsAppOrder = false;
|
||||||
|
|
||||||
|
// ✅ أضف هذا: reset الوجهة لموقع الراكب حتى لا تبقى قيمة الرحلة القديمة
|
||||||
|
myDestination = passengerLocation;
|
||||||
|
hintTextDestinationPoint = 'Select your destination'.tr;
|
||||||
|
|
||||||
|
placeDestinationController.clear();
|
||||||
|
placeStartController.clear();
|
||||||
|
|
||||||
|
rideConfirm = false;
|
||||||
|
shouldFetch = false;
|
||||||
|
isDrawingRoute = false;
|
||||||
|
isLoading = false;
|
||||||
|
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------
|
||||||
// 🛑 دالة الخطأ القاتل (تغلق كل شيء وتعيد المستخدم للخريطة)
|
// 🛑 دالة الخطأ القاتل (تغلق كل شيء وتعيد المستخدم للخريطة)
|
||||||
// -----------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1424,6 +1424,19 @@ class MyTranslation extends Translations {
|
|||||||
"We Are Sorry That we dont have cars in your Location!":
|
"We Are Sorry That we dont have cars in your Location!":
|
||||||
"نأسف لعدم توفر سيارات في موقعك!",
|
"نأسف لعدم توفر سيارات في موقعك!",
|
||||||
"Choose from Map": "اختر من الخريطة",
|
"Choose from Map": "اختر من الخريطة",
|
||||||
|
'Destination Set': "تم تعيين الوجهة",
|
||||||
|
'Now move the map to your pickup point':
|
||||||
|
"الآن حرك الخريطة إلى نقطة الانطلاق الخاصة بك",
|
||||||
|
'Move map to your pickup point':
|
||||||
|
"حرك الخريطة إلى نقطة الانطلاق الخاصة بك",
|
||||||
|
'Move map to set start location': "حرك الخريطة لتعيين موقع الانطلاق",
|
||||||
|
'Move map to your work location': "حرك الخريطة إلى موقع عملك",
|
||||||
|
'Move map to your home location': "حرك الخريطة إلى موقع منزلك",
|
||||||
|
'Move map to select destination': "حرك الخريطة لاختيار الوجهة",
|
||||||
|
'Confirm Pickup Location': "تأكيد موقع الانطلاق",
|
||||||
|
'Open': "فتح",
|
||||||
|
'Set Destination': "تعيين الوجهة",
|
||||||
|
'Tap to search your destination': "اضغط للبحث عن وجهتك",
|
||||||
"Pick your ride location on the map - Tap to confirm":
|
"Pick your ride location on the map - Tap to confirm":
|
||||||
"اختر موقع رحلتك على الخريطة - اضغط للتأكيد",
|
"اختر موقع رحلتك على الخريطة - اضغط للتأكيد",
|
||||||
"Intaleq is the ride-hailing app that is safe, reliable, and accessible.":
|
"Intaleq is the ride-hailing app that is safe, reliable, and accessible.":
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ class Log {
|
|||||||
Log._();
|
Log._();
|
||||||
|
|
||||||
static void print(String value, {StackTrace? stackTrace}) {
|
static void print(String value, {StackTrace? stackTrace}) {
|
||||||
developer.log(value, name: 'LOG', stackTrace: stackTrace);
|
// developer.log(value, name: 'LOG', stackTrace: stackTrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Object? inspect(Object? object) {
|
static Object? inspect(Object? object) {
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ class TestPage extends StatelessWidget {
|
|||||||
// زر البدء
|
// زر البدء
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
debugPrint("🍎 محاولة تشغيل Live Activity (Start)...");
|
print("🍎 محاولة تشغيل Live Activity (Start)...");
|
||||||
try {
|
try {
|
||||||
await IosLiveActivityService.startRideActivity(
|
await IosLiveActivityService.startRideActivity(
|
||||||
rideId: "123",
|
rideId: "123",
|
||||||
@@ -143,10 +143,10 @@ class TestPage extends StatelessWidget {
|
|||||||
etaText: "5 دقائق",
|
etaText: "5 دقائق",
|
||||||
progress: 0.2,
|
progress: 0.2,
|
||||||
);
|
);
|
||||||
debugPrint(
|
Log.print(
|
||||||
"✅ تم تشغيل Live Activity بنجاح! أغلق الشاشة لترى النتيجة.");
|
"✅ تم تشغيل Live Activity بنجاح! أغلق الشاشة لترى النتيجة.");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint("❌ خطأ في Start Live Activity: $e");
|
Log.print("❌ خطأ في Start Live Activity: $e");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: const Text('Start Activity'),
|
child: const Text('Start Activity'),
|
||||||
@@ -157,7 +157,7 @@ class TestPage extends StatelessWidget {
|
|||||||
// زر التحديث العشوائي
|
// زر التحديث العشوائي
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
debugPrint("🔄 محاولة تحديث Live Activity (Update)...");
|
Log.print("🔄 محاولة تحديث Live Activity (Update)...");
|
||||||
|
|
||||||
// توليد بيانات عشوائية للاختبار
|
// توليد بيانات عشوائية للاختبار
|
||||||
final statuses = ['waiting', 'ongoing'];
|
final statuses = ['waiting', 'ongoing'];
|
||||||
@@ -178,10 +178,10 @@ class TestPage extends StatelessWidget {
|
|||||||
etaText: eta,
|
etaText: eta,
|
||||||
progress: progress,
|
progress: progress,
|
||||||
);
|
);
|
||||||
debugPrint(
|
Log.print(
|
||||||
"✅ تم تحديث Live Activity: status=$status, eta=$eta, progress=$progress");
|
"✅ تم تحديث Live Activity: status=$status, eta=$eta, progress=$progress");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint("❌ خطأ في Update Live Activity: $e");
|
Log.print("❌ خطأ في Update Live Activity: $e");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: const Text('Update (Random)'),
|
child: const Text('Update (Random)'),
|
||||||
@@ -195,12 +195,12 @@ class TestPage extends StatelessWidget {
|
|||||||
backgroundColor: Colors.red,
|
backgroundColor: Colors.red,
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
debugPrint("🛑 محاولة إنهاء Live Activity (End)...");
|
Log.print("🛑 محاولة إنهاء Live Activity (End)...");
|
||||||
try {
|
try {
|
||||||
await IosLiveActivityService.endRideActivity();
|
await IosLiveActivityService.endRideActivity();
|
||||||
debugPrint("✅ تم إنهاء Live Activity.");
|
Log.print("✅ تم إنهاء Live Activity.");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint("❌ خطأ في End Live Activity: $e");
|
Log.print("❌ خطأ في End Live Activity: $e");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: const Text('End Activity'),
|
child: const Text('End Activity'),
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user