2026-02-21-overlay
This commit is contained in:
@@ -21,6 +21,9 @@ class AppLink {
|
||||
static String ride = '$server/ride';
|
||||
static String rideServer = 'https://rides.intaleq.xyz/intaleq/ride';
|
||||
|
||||
///mapOSM = 'https://routesy.intaleq.xyz'
|
||||
static String mapOSM = 'https://routesy.intaleq.xyz';
|
||||
|
||||
static String seferCairoServer = endPoint;
|
||||
static String seferGizaServer =
|
||||
box.read('Giza') ?? box.read(BoxName.serverChosen);
|
||||
|
||||
@@ -395,7 +395,12 @@ class MapDriverController extends GetxController {
|
||||
}, TableName.driverOrdersRefuse);
|
||||
} catch (_) {}
|
||||
|
||||
Get.find<HomeCaptainController>().getRefusedOrderByCaptain();
|
||||
if (Get.isRegistered<HomeCaptainController>()) {
|
||||
Get.find<HomeCaptainController>().getRefusedOrderByCaptain();
|
||||
} else {
|
||||
// في حال لم يكن مسجل (جاي من background)
|
||||
Get.put(HomeCaptainController()).getRefusedOrderByCaptain();
|
||||
}
|
||||
|
||||
if (Get.isDialogOpen == true) Get.back();
|
||||
Get.offAll(
|
||||
@@ -1596,7 +1601,7 @@ class MapDriverController extends GetxController {
|
||||
'${origin.longitude},${origin.latitude};${destination.longitude},${destination.latitude}';
|
||||
// استخدام الرابط من الكلاس المرجعي لأنه أحدث
|
||||
var url =
|
||||
"https://routesy.intaleq.xyz/route/v1/driving/$coordinates?steps=true&overview=full";
|
||||
"${AppLink.mapOSM}/route/v1/driving/$coordinates?steps=true&overview=full";
|
||||
|
||||
try {
|
||||
var response = await http.get(Uri.parse(url));
|
||||
|
||||
@@ -61,8 +61,7 @@ class NavigationController extends GetxController {
|
||||
String distanceToNextStep = "";
|
||||
|
||||
// الرابط الجديد
|
||||
static const String _routeApiBaseUrl =
|
||||
"https://routesy.intaleq.xyz/route/v1/driving";
|
||||
static final String _routeApiBaseUrl = "${AppLink.mapOSM}/route/v1/driving";
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
|
||||
@@ -201,6 +201,8 @@ Future<void> backgroundMessageHandler(RemoteMessage message) async {
|
||||
String passengerName = title;
|
||||
String pickup = 'موقع الانطلاق';
|
||||
String dropoff = 'موقع الوصول';
|
||||
double pLat = 0.0;
|
||||
double pLng = 0.0;
|
||||
|
||||
if (myList.isNotEmpty && myList.length > 29) {
|
||||
fare = double.tryParse(myList[26].toString()) ?? 0.0;
|
||||
@@ -208,6 +210,10 @@ Future<void> backgroundMessageHandler(RemoteMessage message) async {
|
||||
passengerName = myList[8].toString();
|
||||
pickup = myList[29].toString();
|
||||
dropoff = myList[30].toString();
|
||||
|
||||
// 🔴 استخراج الإحداثيات للخريطة (تأكد من الاندكس الخاص بخطوط الطول والعرض في مصفوفتك)
|
||||
pLat = double.tryParse(myList[0].toString()) ?? 0.0;
|
||||
pLng = double.tryParse(myList[1].toString()) ?? 0.0;
|
||||
}
|
||||
|
||||
final tripData = TripData(
|
||||
@@ -218,8 +224,8 @@ Future<void> backgroundMessageHandler(RemoteMessage message) async {
|
||||
distanceKm: distance,
|
||||
estimatedFare: fare,
|
||||
estimatedMinutes: 0,
|
||||
pickupLat: 0.0,
|
||||
pickupLng: 0.0,
|
||||
pickupLat: pLat, // تمرير خط العرض
|
||||
pickupLng: pLng, // تمرير خط الطول
|
||||
);
|
||||
|
||||
bool isAppInForeground = box.read(BoxName.isAppInForeground) ?? false;
|
||||
|
||||
@@ -4,7 +4,7 @@ class Log {
|
||||
Log._();
|
||||
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user