Update: 2026-07-23 22:14:10
This commit is contained in:
@@ -124,6 +124,11 @@ class FirebaseMessagesController extends GetxController {
|
||||
|
||||
// ... داخل معالج الإشعارات في تطبيق الراكب ...
|
||||
else if (category == 'Accepted Ride') {
|
||||
if (Platform.isAndroid) {
|
||||
String notifTitle = 'Ride Accepted ✅'.tr;
|
||||
String notifBody = 'The captain is on their way to you now.'.tr;
|
||||
notificationController.showNotification(notifTitle, notifBody, 'ding');
|
||||
}
|
||||
if (mapCtrl != null) {
|
||||
Map<String, dynamic>? driverInfoMap;
|
||||
|
||||
@@ -198,6 +203,11 @@ class FirebaseMessagesController extends GetxController {
|
||||
update();
|
||||
} else if (category == 'Trip is Begin') {
|
||||
// <-- كان 'Trip is Begin'
|
||||
if (Platform.isAndroid) {
|
||||
String notifTitle = 'Trip Begun 🚀'.tr;
|
||||
String notifBody = 'Have a safe and comfortable trip.'.tr;
|
||||
notificationController.showNotification(notifTitle, notifBody, 'ding');
|
||||
}
|
||||
Log.print('[FCM] استقبل إشعار "TRIP_BEGUN".');
|
||||
// استدعاء الحارس
|
||||
mapCtrl!.processRideBegin(source: "FCM");
|
||||
@@ -208,9 +218,19 @@ class FirebaseMessagesController extends GetxController {
|
||||
}
|
||||
update();
|
||||
} else if (category == "Arrive Ride") {
|
||||
if (Platform.isAndroid) {
|
||||
String notifTitle = 'Driver is outside 🚖'.tr;
|
||||
String notifBody = 'The captain has arrived at your location.'.tr;
|
||||
notificationController.showNotification(notifTitle, notifBody, 'ding');
|
||||
}
|
||||
// استدعاء الحارس
|
||||
mapCtrl!.processDriverArrival("FCM");
|
||||
} else if (category == 'Driver Finish Trip') {
|
||||
if (Platform.isAndroid) {
|
||||
String notifTitle = 'Trip Finished 🏁'.tr;
|
||||
String notifBody = 'Please pay and rate the driver.'.tr;
|
||||
notificationController.showNotification(notifTitle, notifBody, 'ding');
|
||||
}
|
||||
List<dynamic> driverList = [];
|
||||
|
||||
// ✅ معالجة آمنة للبيانات
|
||||
|
||||
Reference in New Issue
Block a user