25-10-11/1
This commit is contained in:
@@ -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) {}
|
||||
|
||||
Reference in New Issue
Block a user