25-10-6/1

This commit is contained in:
Hamza-Ayed
2025-10-05 23:45:18 +03:00
parent f5dfe2c0fe
commit de84662e02
18 changed files with 590 additions and 451 deletions

View File

@@ -10,6 +10,7 @@ import 'package:Intaleq/views/home/map_page_passenger.dart';
import 'package:Intaleq/views/widgets/elevated_btn.dart';
import '../firebase/firbase_messge.dart';
import '../firebase/notification_service.dart';
import '../payment/payment_controller.dart';
// import '../home/captin/home_captain_controller.dart';
@@ -70,12 +71,21 @@ class RateController extends GetxController {
'token': token1,
});
if (res != 'failure') {
Get.find<FirebaseMessagesController>().sendNotificationToDriverMAP(
'You Have Tips'.tr,
'${'${tip.toString()}\$${' tips\nTotal is'.tr}'} ${tip + (Get.find<MapPassengerController>().totalPassenger)}',
Get.find<MapPassengerController>().driverToken.toString(),
[],
'ding.wav',
// Get.find<FirebaseMessagesController>().sendNotificationToDriverMAP(
// 'You Have Tips'.tr,
// '${'${tip.toString()}\$${' tips\nTotal is'.tr}'} ${tip + (Get.find<MapPassengerController>().totalPassenger)}',
// Get.find<MapPassengerController>().driverToken.toString(),
// [],
// 'ding',
// );
await NotificationService.sendNotification(
target: Get.find<MapPassengerController>().driverToken.toString(),
title: 'You Have Tips',
body:
'${'${tip.toString()}\$${' tips\nTotal is'.tr}'} ${tip + (Get.find<MapPassengerController>().totalPassenger)}',
isTopic: false, // Important: this is a token
tone: 'ding',
driverList: [],
);
}
}