Update: 2026-07-02 16:52:25

This commit is contained in:
Hamza-Ayed
2026-07-02 16:52:25 +03:00
parent 75e6fc42d7
commit 5d14493ff4
9 changed files with 213 additions and 20 deletions
@@ -157,7 +157,8 @@ class FirebaseMessagesController extends GetxController {
Get.toNamed('/OrderRequestPage', arguments: {
'myListString': myListString,
'DriverList': myList,
'body': body
'body': body,
'is_destination_match': message.data['is_destination_match'] ?? '0',
});
}
break;
@@ -405,7 +405,8 @@ class LocationController extends GetxController with WidgetsBindingObserver {
Get.toNamed('/OrderRequestPage', arguments: {
'myListString': jsonEncode(driverList),
'DriverList': driverList,
'body': 'New Trip Request via Socket ⚡'
'body': 'New Trip Request via Socket ⚡',
'is_destination_match': rideData['is_destination_match'] ?? '0',
});
} else {
Log.print(
@@ -63,6 +63,7 @@ class OrderRequestController extends GetxController
String totalTripDistance = "--";
String totalTripDuration = "--";
String tripPrice = "--";
bool isDestinationMatch = false; // 🆕 Destination Match flag
String timeToPassenger = "Calculating...".tr;
String distanceToPassenger = "--";
@@ -158,6 +159,12 @@ class OrderRequestController extends GetxController
print("Error decoding DriverList: $e");
}
}
// 🆕 Check for Destination Match flag from FCM data
if (args['is_destination_match'] == '1' ||
args['is_destination_match'] == 1 ||
args['is_destination_match'] == true) {
isDestinationMatch = true;
}
}
// ب) هل هي قادمة من Socket بالمفاتيح الرقمية ("0", "1", ...)؟
else {