9/13/3
This commit is contained in:
@@ -23,6 +23,7 @@ class FirebasMessagesController extends GetxController {
|
||||
|
||||
List<String> tokens = [];
|
||||
List dataTokens = [];
|
||||
late String driverID;
|
||||
NotificationSettings? notificationSettings;
|
||||
@override
|
||||
void onInit() async {
|
||||
@@ -110,103 +111,13 @@ class FirebasMessagesController extends GetxController {
|
||||
'DriverList': myList,
|
||||
'body': message.notification!.body
|
||||
});
|
||||
// Get.defaultDialog(
|
||||
// barrierDismissible: false,
|
||||
// title: message.notification!.title.toString(),
|
||||
// content: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// // Text(message.notification!.body.toString()),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: TextButton.icon(
|
||||
// onPressed: () {
|
||||
// String mapUrl =
|
||||
// 'https://www.google.com/maps/dir/${myList[0]}/${myList[1]}/';
|
||||
// print(mapUrl);
|
||||
// launchUrl1(mapUrl);
|
||||
// },
|
||||
// icon: const Icon(Icons.map),
|
||||
// label: Text('Rouats of Trip'.tr)),
|
||||
// ),
|
||||
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Text(
|
||||
// 'Tatal From Passenger is '.tr +
|
||||
// double.parse(myList[2]).toStringAsFixed(2),
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Text(
|
||||
// 'Tatal For You is '.tr +
|
||||
// double.parse(myList[3]).toStringAsFixed(2),
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Text(
|
||||
// 'Distance is '.tr + myList[5].toString() + ' KM'.tr,
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Text(
|
||||
// 'Duration of Trip is '.tr +
|
||||
// myList[4].toString() +
|
||||
// ' Minutes'.tr,
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// MyElevatedButton(
|
||||
// title: 'Apply Order'.tr,
|
||||
// onPressed: () async {
|
||||
// await CRUD().postFromDialogue(
|
||||
// link: AppLink.addDriverOrder,
|
||||
// payload: {
|
||||
// 'driver_id': myList[6].toString(),
|
||||
// // box.read(BoxName.driverID).toString(),
|
||||
// 'order_id':
|
||||
// message.notification!.body.toString(),
|
||||
// 'status': 'Apply'
|
||||
// });
|
||||
// },
|
||||
// ),
|
||||
// MyElevatedButton(
|
||||
// title: 'Refuse Order'.tr,
|
||||
// onPressed: () async {
|
||||
// await CRUD().postFromDialogue(
|
||||
// link: AppLink.addDriverOrder,
|
||||
// payload: {
|
||||
// 'driver_id': myList[6].toString(),
|
||||
// // box.read(BoxName.driverID).toString(),
|
||||
// 'order_id':
|
||||
// message.notification!.body.toString(),
|
||||
// 'status': 'Refused'
|
||||
// });
|
||||
// },
|
||||
// kolor: AppColor.redColor,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// ));
|
||||
} else if (message.notification!.title!.contains('Apply Ride')) {
|
||||
// MapController().rideConfirm = true;
|
||||
var passengerList = message.data['passengerList'];
|
||||
print(passengerList);
|
||||
print('9999999999999my Apply Ride 999999999999999');
|
||||
var myList = jsonDecode(passengerList) as List<dynamic>;
|
||||
driverID = myList[2].toString();
|
||||
Get.snackbar(
|
||||
'Captin Applied the Ride for You'.tr,
|
||||
'message',
|
||||
@@ -266,25 +177,6 @@ class FirebasMessagesController extends GetxController {
|
||||
overlayColor: AppColor.primaryColor.withOpacity(0.5),
|
||||
userInputForm: null,
|
||||
);
|
||||
|
||||
// Get.defaultDialog(
|
||||
// barrierDismissible: false,
|
||||
// title: message.notification!.title.toString(),
|
||||
// content: Row(
|
||||
// children: [Text(myList[1].toString())],
|
||||
// ),
|
||||
// confirm: MyElevatedButton(
|
||||
// title: 'Ok',
|
||||
// onPressed: () {
|
||||
// // MapController().rideConfirm = true;
|
||||
// },
|
||||
// ),
|
||||
// cancel: MyElevatedButton(
|
||||
// title: 'Cancel',
|
||||
// onPressed: () {
|
||||
// Get.back();
|
||||
// },
|
||||
// ));
|
||||
} else if (message.notification!.title!.contains('Promo')) {
|
||||
Get.to(const PromosPassengerPage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user