25-10-5/1
This commit is contained in:
@@ -9,7 +9,9 @@ import 'package:sefer_driver/views/widgets/elevated_btn.dart';
|
||||
|
||||
import '../../../../constant/box_name.dart';
|
||||
import '../../../../constant/style.dart';
|
||||
import '../../../../controller/firebase/notification_service.dart';
|
||||
import '../../../../main.dart';
|
||||
import '../../../../print.dart';
|
||||
|
||||
// Changed: إعادة تصميم كاملة لتصبح شريط معلومات علوي مدمج
|
||||
class PassengerInfoWindow extends StatelessWidget {
|
||||
@@ -154,12 +156,23 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
if (await controller
|
||||
.calculateDistanceBetweenDriverAndPassengerLocation() <
|
||||
140) {
|
||||
fcm.sendNotificationToDriverMAP(
|
||||
'Hi ,I Arrive your site',
|
||||
'I Arrive at your site'.tr,
|
||||
controller.tokenPassenger,
|
||||
[],
|
||||
'ding.wav',
|
||||
// fcm.sendNotificationToDriverMAP(
|
||||
// 'Hi ,I Arrive your site',
|
||||
// 'I Arrive at your site'.tr,
|
||||
// controller.tokenPassenger,
|
||||
// [],
|
||||
// 'ding.wav',
|
||||
// );
|
||||
Log.print(
|
||||
'controller.tokenPassenger: ${controller.tokenPassenger}');
|
||||
|
||||
NotificationService.sendNotification(
|
||||
target: controller.tokenPassenger.toString(),
|
||||
title: 'Hi ,I Arrive your site'.tr,
|
||||
body: 'I Arrive at your site'.tr,
|
||||
isTopic: false, // Important: this is a token
|
||||
tone: 'ding',
|
||||
driverList: [],
|
||||
);
|
||||
controller.startTimerToShowDriverWaitPassengerDuration();
|
||||
controller.isArrivedSend = false;
|
||||
@@ -239,13 +252,22 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
kolor: AppColor.deepPurpleAccent,
|
||||
onPressed: () {
|
||||
MyDialog().getDialog('Are you sure to cancel?'.tr, '', () async {
|
||||
fcm.sendNotificationToDriverMAP(
|
||||
'Driver Cancelled Your Trip',
|
||||
'You will need to pay the cost to the driver, or it will be deducted from your next trip'
|
||||
.tr,
|
||||
controller.tokenPassenger,
|
||||
[],
|
||||
'cancel.wav');
|
||||
// fcm.sendNotificationToDriverMAP(
|
||||
// 'Driver Cancelled Your Trip',
|
||||
// 'You will need to pay the cost to the driver, or it will be deducted from your next trip'
|
||||
// .tr,
|
||||
// controller.tokenPassenger,
|
||||
// [],
|
||||
// 'cancel.wav');
|
||||
NotificationService.sendNotification(
|
||||
target: controller.tokenPassenger.toString(),
|
||||
title: 'Driver Cancelled Your Trip',
|
||||
body:
|
||||
'You will need to pay the cost to the driver, or it will be deducted from your next trip',
|
||||
isTopic: false, // Important: this is a token
|
||||
tone: 'cancel',
|
||||
driverList: [],
|
||||
);
|
||||
box.write(BoxName.rideStatus, 'Cancel');
|
||||
await controller.addWaitingTimeCostFromPassengerToDriverWallet();
|
||||
controller.isdriverWaitTimeEnd = false;
|
||||
|
||||
Reference in New Issue
Block a user