25-10-11/1

This commit is contained in:
Hamza-Ayed
2025-11-06 12:29:17 +03:00
parent 14484fcd8f
commit a69e4c6912
46 changed files with 14145 additions and 13529 deletions

View File

@@ -237,8 +237,10 @@ Future<void> checkForPendingOrderFromServer() async {
// MyDialog().getDialog(orderId.toString(), customerToken, () {});
// Now proceed with the UI flow
_sendAcceptanceNotification(customerToken, orderId.toString());
// _sendAcceptanceNotification(customerToken, orderId.toString());
// await _bringAppToForegroundAndNavigate(orderId);
Get.to(() => PassengerLocationMapPage(),
arguments: box.read(BoxName.rideArgumentsFromBackground));
} else {
box.write(BoxName.rideArgumentsFromBackground, 'failure');
}
@@ -307,8 +309,7 @@ Map<String, dynamic> _transformServerDataToAppArguments(
void _sendAcceptanceNotification(String? customerToken, rideId) {
try {
if (customerToken == null) return;
final FirebaseMessagesController _firebaseMessagesController =
Get.put(FirebaseMessagesController());
List<String> bodyToPassenger = [
box.read(BoxName.driverID).toString(),
box.read(BoxName.nameDriver).toString(),
@@ -319,15 +320,13 @@ void _sendAcceptanceNotification(String? customerToken, rideId) {
// Safely check for customer token
final String? token = customerToken;
if (token != null && token.isNotEmpty) {
// _firebaseMessagesController.sendNotificationToDriverMAP('Accepted Ride',
// 'your ride is applied'.tr, token, bodyToPassenger, 'start.wav');
NotificationService.sendNotification(
target: token.toString(),
title: 'Accepted Ride',
title: 'Accepted Ride'.tr,
body: 'your ride is Accepted'.tr,
isTopic: false, // Important: this is a token
tone: 'start',
driverList: [],
driverList: bodyToPassenger, category: 'Accepted Ride',
);
} else {}
} catch (e) {}