10/2/1
This commit is contained in:
@@ -178,6 +178,12 @@ class FirebasMessagesController extends GetxController {
|
||||
);
|
||||
} else if (message.notification!.title!.contains('Promo')) {
|
||||
Get.to(const PromosPassengerPage());
|
||||
} else if (message.notification!.title == ('Ride Begin')) {
|
||||
Get.snackbar(
|
||||
'Trip Begin'.tr,
|
||||
'by Passenger'.tr,
|
||||
backgroundColor: AppColor.yellowColor,
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -464,21 +470,7 @@ class FirebasMessagesController extends GetxController {
|
||||
}
|
||||
}
|
||||
|
||||
void sendNotificationToDriverId(
|
||||
String title,
|
||||
body,
|
||||
strin1,
|
||||
strin2,
|
||||
strin3,
|
||||
strin4,
|
||||
strin5,
|
||||
strin6,
|
||||
string7,
|
||||
string8,
|
||||
passengerName,
|
||||
passengertoken,
|
||||
passengerPhone,
|
||||
token) async {
|
||||
void sendNotificationToDriverId(String title, body, token) async {
|
||||
http
|
||||
.post(Uri.parse('https://fcm.googleapis.com/fcm/send'),
|
||||
headers: <String, String>{
|
||||
@@ -491,21 +483,7 @@ class FirebasMessagesController extends GetxController {
|
||||
'body': body,
|
||||
'sound': 'true'
|
||||
},
|
||||
'data': {
|
||||
'myList': jsonEncode([
|
||||
strin1,
|
||||
strin2,
|
||||
strin3,
|
||||
strin4,
|
||||
strin5,
|
||||
strin6,
|
||||
string7,
|
||||
string8,
|
||||
passengerName,
|
||||
passengertoken,
|
||||
passengerPhone
|
||||
]),
|
||||
},
|
||||
'data': {},
|
||||
'priority': 'high',
|
||||
'to': token,
|
||||
}))
|
||||
|
||||
@@ -214,7 +214,7 @@ class MapController extends GetxController {
|
||||
box.read(BoxName.phone).toString(),
|
||||
durationByPassenger.toString(),
|
||||
distanceByPassenger.toString(),
|
||||
paymentController.isWalletChecked.toString() //todo if it is work
|
||||
paymentController.isWalletChecked.toString()
|
||||
];
|
||||
FirebasMessagesController().sendNotificationToDriverMAP(
|
||||
'Order',
|
||||
|
||||
Reference in New Issue
Block a user