6/30/1
This commit is contained in:
@@ -56,11 +56,11 @@ GetBuilder<HomeCaptainController> callPage() {
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
FirebaseMessagesController().sendNotificationToPassengerToken(
|
||||
'Call End'.tr,
|
||||
'Call End',
|
||||
Get.find<MapDriverController>().tokenPassenger,
|
||||
[],
|
||||
);
|
||||
'Call End'.tr,
|
||||
'Call End',
|
||||
Get.find<MapDriverController>().tokenPassenger,
|
||||
[],
|
||||
'iphone_ringtone.wav');
|
||||
callController.leave();
|
||||
Get.back();
|
||||
},
|
||||
|
||||
@@ -10,6 +10,7 @@ import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import '../../../../../constant/char_map.dart';
|
||||
import '../../../../../constant/colors.dart';
|
||||
import '../../../../../constant/credential.dart';
|
||||
import '../../../../../controller/functions/launch.dart';
|
||||
import '../../../../Rate/ride_calculate_driver.dart';
|
||||
import '../../../../../controller/functions/location_controller.dart';
|
||||
|
||||
@@ -166,8 +167,7 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
// borderRadius: BorderRadius.circular(15)),
|
||||
// child: IconButton(
|
||||
// onPressed: () {
|
||||
// Get.to(() => PassengerLocationMapPage(),
|
||||
// arguments: box.read(BoxName.rideArguments));
|
||||
// launchCommunication('phone', '+201023248456', '');
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// FontAwesome5.grin_tears,
|
||||
|
||||
@@ -47,7 +47,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Go to passenger Location now'.tr,
|
||||
'Go to passenger Location'.tr,
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.greenColor),
|
||||
),
|
||||
@@ -63,10 +63,16 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
true;
|
||||
await controller
|
||||
.driverCallPassenger(); // to check from scam
|
||||
Get.to(
|
||||
() => const CallPage());
|
||||
// launchCommunication('phone',
|
||||
// controller.phone.toString(), '');
|
||||
// Get.to(
|
||||
// () => const CallPage());
|
||||
makePhoneCall(controller
|
||||
.passengerPhone
|
||||
.toString());
|
||||
// launchCommunication(
|
||||
// 'phone',
|
||||
// controller.passengerPhone
|
||||
// ,
|
||||
// '');
|
||||
},
|
||||
child: const Icon(
|
||||
Icons.phone,
|
||||
@@ -76,17 +82,113 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
width: 25,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
controller.isSocialPressed =
|
||||
true;
|
||||
launchCommunication(
|
||||
'email',
|
||||
controller.passengerPhone
|
||||
.toString(),
|
||||
'${'Hello this is Driver'.tr} ${box.read(BoxName.nameDriver)}');
|
||||
onTap: () async {
|
||||
Get.defaultDialog(
|
||||
title:
|
||||
'Select one message'
|
||||
.tr,
|
||||
titleStyle:
|
||||
AppStyle.title,
|
||||
content: SizedBox(
|
||||
height: Get.height * .5,
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.spaceEvenly,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||
'message From Driver'
|
||||
.tr,
|
||||
"There's heavy traffic here. Can you suggest an alternate pickup point?"
|
||||
.tr,
|
||||
controller
|
||||
.tokenPassenger,
|
||||
'ding.wav');
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
decoration: AppStyle
|
||||
.boxDecoration1,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets
|
||||
.all(
|
||||
10),
|
||||
child: Text(
|
||||
"There's heavy traffic here. Can you suggest an alternate pickup point?"
|
||||
.tr,
|
||||
style: AppStyle
|
||||
.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||
'message From Driver'
|
||||
.tr,
|
||||
"Heading your way now. Please be ready."
|
||||
.tr,
|
||||
controller
|
||||
.tokenPassenger,
|
||||
'ding.wav');
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
decoration: AppStyle
|
||||
.boxDecoration1,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets
|
||||
.all(
|
||||
10),
|
||||
child: Text(
|
||||
"Heading your way now. Please be ready."
|
||||
.tr,
|
||||
style: AppStyle
|
||||
.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||
'message From Driver'
|
||||
.tr,
|
||||
'Approaching your area. Should be there in 3 minutes.'
|
||||
.tr,
|
||||
controller
|
||||
.tokenPassenger,
|
||||
'ding.wav');
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
decoration: AppStyle
|
||||
.boxDecoration1,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets
|
||||
.all(
|
||||
10),
|
||||
child: Text(
|
||||
'Approaching your area. Should be there in 3 minutes.'
|
||||
.tr,
|
||||
style: AppStyle
|
||||
.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
},
|
||||
child: const Icon(
|
||||
Icons.email,
|
||||
Icons.message,
|
||||
color: AppColor.redColor,
|
||||
)),
|
||||
const SizedBox(
|
||||
@@ -269,7 +371,8 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
.tr,
|
||||
controller
|
||||
.tokenPassenger,
|
||||
[]);
|
||||
[],
|
||||
'start.wav');
|
||||
controller
|
||||
.startTimerToShowDriverWaitPassengerDuration();
|
||||
controller
|
||||
@@ -356,7 +459,8 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
.tr,
|
||||
controller
|
||||
.tokenPassenger,
|
||||
[]);
|
||||
[],
|
||||
'cancel.wav');
|
||||
await controller
|
||||
.addWaitingTimeCostFromPassengerToDriverWallet();
|
||||
controller
|
||||
|
||||
@@ -296,6 +296,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
onPressed: () async {
|
||||
box.write(BoxName.statusDriverLocation, 'on');
|
||||
|
||||
orderRequestController.endTimer();
|
||||
orderRequestController.changeApplied();
|
||||
await CRUD().postFromDialogue(
|
||||
link: AppLink.addDriverOrder,
|
||||
@@ -320,12 +321,13 @@ class OrderRequestPage extends StatelessWidget {
|
||||
];
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Apply Ride', 'your ride is applied'.tr,
|
||||
// arguments['DriverList'][9].toString(),
|
||||
arguments['DriverList'][9].toString(),
|
||||
// box.read(BoxName.tokenDriver).toString(),
|
||||
bodyToPassenger,
|
||||
);
|
||||
'Apply Ride',
|
||||
'your ride is applied'.tr,
|
||||
// arguments['DriverList'][9].toString(),
|
||||
arguments['DriverList'][9].toString(),
|
||||
// box.read(BoxName.tokenDriver).toString(),
|
||||
bodyToPassenger,
|
||||
'start.wav');
|
||||
Get.back();
|
||||
box.write(BoxName.rideArguments, {
|
||||
'passengerLocation': myList[0].toString(),
|
||||
@@ -392,6 +394,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
MyElevatedButton(
|
||||
title: 'Refuse Order'.tr,
|
||||
onPressed: () async {
|
||||
orderRequestController.endTimer();
|
||||
List<String> bodyToPassenger = [
|
||||
box.read(BoxName.driverID).toString(),
|
||||
box.read(BoxName.nameDriver).toString(),
|
||||
@@ -400,12 +403,12 @@ class OrderRequestPage extends StatelessWidget {
|
||||
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Refused Ride',
|
||||
'${box.read(BoxName.nameDriver)} ${'reject your order.'.tr}',
|
||||
arguments['DriverList'][9].toString(),
|
||||
// box.read(BoxName.tokenDriver).toString(),
|
||||
bodyToPassenger,
|
||||
);
|
||||
'Refused Ride'.tr,
|
||||
'${box.read(BoxName.nameDriver)} ${'reject your order.'.tr}',
|
||||
arguments['DriverList'][9].toString(),
|
||||
// box.read(BoxName.tokenDriver).toString(),
|
||||
bodyToPassenger,
|
||||
'cancel.wav');
|
||||
orderRequestController.refuseOrder(
|
||||
myList[16].toString(),
|
||||
);
|
||||
|
||||
@@ -350,12 +350,13 @@ class OrderSpeedRequest extends StatelessWidget {
|
||||
});
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Apply Ride', 'your ride is applied'.tr,
|
||||
// arguments['DriverList'][9].toString(),
|
||||
arguments['DriverList'][9].toString(),
|
||||
// box.read(BoxName.tokenDriver).toString(),
|
||||
bodyToPassenger,
|
||||
);
|
||||
'Apply Ride',
|
||||
'your ride is applied'.tr,
|
||||
// arguments['DriverList'][9].toString(),
|
||||
arguments['DriverList'][9].toString(),
|
||||
// box.read(BoxName.tokenDriver).toString(),
|
||||
bodyToPassenger,
|
||||
'start.wav');
|
||||
Get.back();
|
||||
|
||||
// 'Arguments passed to PassengerLocationMapPage:');
|
||||
@@ -397,42 +398,7 @@ class OrderSpeedRequest extends StatelessWidget {
|
||||
'endNameLocation': myList[30].toString(),
|
||||
});
|
||||
Get.to(() => PassengerLocationMapPage(),
|
||||
arguments: box.read(BoxName.rideArguments)
|
||||
// {
|
||||
// 'passengerLocation': myList[0].toString(),
|
||||
// 'passengerDestination': myList[1].toString(),
|
||||
// 'Duration': myList[4].toString(),
|
||||
// 'totalCost': myList[26].toString(),
|
||||
// 'Distance': myList[5].toString(),
|
||||
// 'name': myList[8].toString(),
|
||||
// 'phone': myList[10].toString(),
|
||||
// 'email': myList[28].toString(),
|
||||
// 'WalletChecked': myList[13].toString(),
|
||||
// 'tokenPassenger': myList[9].toString(),
|
||||
// 'direction':
|
||||
// 'https://www.google.com/maps/dir/${myList[0]}/${myList[1]}/',
|
||||
// 'DurationToPassenger': myList[15].toString(),
|
||||
// 'rideId': myList[16].toString(),
|
||||
// 'passengerId': myList[7].toString(),
|
||||
// 'driverId': myList[18].toString(),
|
||||
// 'durationOfRideValue': myList[19].toString(),
|
||||
// 'paymentAmount': myList[2].toString(),
|
||||
// 'paymentMethod': myList[13].toString() == 'true'
|
||||
// ? 'visa'
|
||||
// : 'cash',
|
||||
// 'isHaveSteps': myList[20].toString(),
|
||||
// 'step0': myList[21].toString(),
|
||||
// 'step1': myList[22].toString(),
|
||||
// 'step2': myList[23].toString(),
|
||||
// 'step3': myList[24].toString(),
|
||||
// 'step4': myList[25].toString(),
|
||||
// 'passengerWalletBurc': myList[26].toString(),
|
||||
// 'timeOfOrder': DateTime.now().toString(),
|
||||
// 'totalPassenger': myList[2].toString(),
|
||||
// 'carType': myList[31].toString(),
|
||||
// 'kazan': myList[32].toString(),
|
||||
// }
|
||||
);
|
||||
arguments: box.read(BoxName.rideArguments));
|
||||
}
|
||||
// });
|
||||
// Get.back();
|
||||
|
||||
Reference in New Issue
Block a user