From 651df6b8974aee2b57cfb59f780922510d1feeb0 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Thu, 26 Dec 2024 18:27:15 +0300 Subject: [PATCH] 24-12/26/2 --- lib/controller/firebase/firbase_messge.dart | 10 +++++++--- lib/controller/local/translations.dart | 1 - 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/controller/firebase/firbase_messge.dart b/lib/controller/firebase/firbase_messge.dart index 8dc26d6..70dfe23 100644 --- a/lib/controller/firebase/firbase_messge.dart +++ b/lib/controller/firebase/firbase_messge.dart @@ -191,7 +191,7 @@ class FirebaseMessagesController extends GetxController { passengerDialog(message.notification!.body!); update(); - } else if (message.notification!.title! == 'RideIsBegin'.tr) { + } else if (message.notification!.title! == 'Trip is Begin'.tr) { if (Platform.isAndroid) { notificationController.showNotification( 'Trip is Begin'.tr, ''.tr, 'start'); @@ -246,10 +246,12 @@ class FirebaseMessagesController extends GetxController { ); } else if (message.notification!.title! == 'Driver Finish Trip'.tr) { var myListString = message.data['DriverList']; + Log.print('myListString: ${myListString}'); var driverList = jsonDecode(myListString) as List; + Log.print('driverList: ${driverList}'); if (Platform.isAndroid) { notificationController.showNotification( - 'Driver Finish Trip'.tr, + "Driver Finish Trip".tr, 'you will pay to Driver'.tr + ' ${driverList[3].toString()} \$'.tr, 'tone1'); } @@ -257,12 +259,14 @@ class FirebaseMessagesController extends GetxController { if (double.parse(box.read(BoxName.passengerWalletTotal)) < 0) { box.write(BoxName.passengerWalletTotal, 0); } + print(333); Get.find().tripFinishedFromDriver(); - notificationController.showNotification( + NotificationController().showNotification( 'Don’t forget your personal belongings.'.tr, 'Please make sure you have all your personal belongings and that any remaining fare, if applicable, has been added to your wallet before leaving. Thank you for choosing the Sefer app' .tr, 'ding'); + print(267); Get.to(() => RateDriverFromPassenger(), arguments: { 'driverId': driverList[0].toString(), 'rideId': driverList[1].toString(), diff --git a/lib/controller/local/translations.dart b/lib/controller/local/translations.dart index d4a1bb4..dc65ce1 100644 --- a/lib/controller/local/translations.dart +++ b/lib/controller/local/translations.dart @@ -715,7 +715,6 @@ class MyTranslation extends Translations { "Are you want to wait drivers to accept your order": "هل عايز تستنى لحد ما السواقين يقبلوا طلبك؟", "deleted": "تم الحذف", - "Trip is begin": "الرحلة بدأت", "This price is fixed even if the route changes for the driver.": "السعر ده ثابت حتى لو المسار اتغير للسواق.", "The price may increase if the route changes.":