5/31/3
This commit is contained in:
@@ -211,6 +211,26 @@ class FirebaseMessagesController extends GetxController {
|
||||
} catch (e) {
|
||||
print('Error navigating to PassengerCallPage: $e');
|
||||
}
|
||||
} else if (message.notification!.title! == 'Call Income from Driver') {
|
||||
try {
|
||||
var myListString = message.data['passengerList'];
|
||||
var driverList = jsonDecode(myListString) as List<dynamic>;
|
||||
// if (Platform.isAndroid) {
|
||||
NotificationController().showNotification(
|
||||
'Call Income'.tr,
|
||||
message.notification!.body!,
|
||||
'iphone_ringtone',
|
||||
);
|
||||
// }
|
||||
// Assuming GetMaterialApp is initialized and context is valid for navigation
|
||||
Get.to(() => PassengerCallPage(
|
||||
channelName: driverList[1].toString(),
|
||||
token: driverList[0].toString(),
|
||||
remoteID: driverList[2].toString(),
|
||||
));
|
||||
} catch (e) {
|
||||
print('Error navigating to PassengerCallPage: $e');
|
||||
}
|
||||
} else if (message.notification!.title! == 'Call End') {
|
||||
try {
|
||||
var myListString = message.data['passengerList'];
|
||||
|
||||
@@ -48,9 +48,9 @@ class CRUD {
|
||||
required String uid,
|
||||
}) async {
|
||||
var uid = box.read(BoxName.phone) ?? box.read(BoxName.phoneDriver);
|
||||
var res = await http.get(
|
||||
Uri.parse(
|
||||
'https://repulsive-pig-rugby-shirt.cyclic.app/token?channelName=$channelName'),
|
||||
var res = await http.get(Uri.parse(
|
||||
// 'https://repulsive-pig-rugby-shirt.cyclic.app/token?channelName=$channelName'),
|
||||
'https://orca-app-b2i85.ondigitalocean.app/token?channelName=$channelName'),
|
||||
headers: {'Authorization': 'Bearer ${AK.agoraAppCertificate}'});
|
||||
|
||||
if (res.statusCode == 200) {
|
||||
|
||||
@@ -2413,8 +2413,8 @@ class MapPassengerController extends GetxController {
|
||||
costDelivery = (distance * deliveryPrice) + costDuration * latePrice;
|
||||
costLady = (distance * comfortPrice + 2) + costDuration * latePrice;
|
||||
costRayehGai = (distance * 2 * speedPrice) -
|
||||
((distance * 2 * speedPrice) * .3) +
|
||||
costDuration * latePrice;
|
||||
((distance * 1 * speedPrice) * .4) +
|
||||
costDuration * 2 * latePrice;
|
||||
|
||||
update();
|
||||
} else if (currentTime.hour >= 13 && currentTime.hour <= 16) {
|
||||
@@ -2425,8 +2425,8 @@ class MapPassengerController extends GetxController {
|
||||
costDelivery = (distance * deliveryPrice) + costDuration * heavyPrice;
|
||||
costLady = (distance * comfortPrice + 2) + costDuration * heavyPrice;
|
||||
costRayehGai = (distance * 2 * speedPrice) -
|
||||
((distance * 2 * speedPrice) * .3) +
|
||||
costDuration * heavyPrice;
|
||||
((distance * 1 * speedPrice) * .4) +
|
||||
costDuration * 2 * heavyPrice;
|
||||
|
||||
update();
|
||||
// } /
|
||||
@@ -2437,8 +2437,8 @@ class MapPassengerController extends GetxController {
|
||||
costDelivery = (distance * deliveryPrice) + costDuration;
|
||||
costLady = (distance * comfortPrice + 2) + costDuration;
|
||||
costRayehGai = (distance * 2 * speedPrice) -
|
||||
((distance * 2 * speedPrice) * .3) +
|
||||
costDuration;
|
||||
((distance * 1 * speedPrice) * .4) +
|
||||
costDuration * 2;
|
||||
update();
|
||||
}
|
||||
//print('cost $cost');
|
||||
|
||||
@@ -4,6 +4,16 @@ class MyTranslation extends Translations {
|
||||
@override
|
||||
Map<String, Map<String, String>> get keys => {
|
||||
"ar": {
|
||||
"joined": "انضم",
|
||||
"Driver joined the channel": "السائق انضم للقناة",
|
||||
"Driver left the channel": "السائق غادر القناة",
|
||||
"Call Page": "صفحة المكالمة",
|
||||
"Call End": "إنهاء المكالمة",
|
||||
"Call Left": "مكالمات متبقية",
|
||||
"\$ Next as Cash \$!": " نقداً !",
|
||||
"To use Wallet charge it": "لاستخدام المحفظة، قم بشحنها",
|
||||
"We are searching for the nearest driver to you":
|
||||
"نبحث عن أقرب سائق إليك",
|
||||
"Best choice for cities": "أفضل اختيار للمدن",
|
||||
"Rayeh Gai: Round trip service for convenient travel between cities, easy and reliable.":
|
||||
" رايح جاي: خدمة ذهاب وعودة للسفر المريح بين المدن، سهلة وموثوقة.",
|
||||
|
||||
Reference in New Issue
Block a user