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();
|
||||
|
||||
@@ -30,233 +30,235 @@ class AvailableRidesPage extends StatelessWidget {
|
||||
body: [
|
||||
rideAvailableController.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: ListView.builder(
|
||||
itemCount: rideAvailableController
|
||||
.rideAvailableMap['message'].length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
var list = rideAvailableController
|
||||
.rideAvailableMap['message'][index];
|
||||
return Container(
|
||||
width: Get.width * .9,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'🟢 ',
|
||||
: ListView.builder(
|
||||
itemCount: rideAvailableController
|
||||
.rideAvailableMap['message'].length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
var list = rideAvailableController
|
||||
.rideAvailableMap['message'][index];
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
width: Get.width * .9,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'🟢 ',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
SizedBox(
|
||||
height: Get.height * .06,
|
||||
width: Get.width * .8,
|
||||
child: Text(
|
||||
'${list['startName']}',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
SizedBox(
|
||||
height: Get.height * .06,
|
||||
width: Get.width * .8,
|
||||
child: Text(
|
||||
'${list['startName']}',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'🔴 ',
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'🔴 ',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
SizedBox(
|
||||
height: Get.height * .06,
|
||||
width: Get.width * .8,
|
||||
child: Text(
|
||||
'${list['endName']}',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
SizedBox(
|
||||
height: Get.height * .06,
|
||||
width: Get.width * .8,
|
||||
child: Text(
|
||||
'${list['endName']}',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text('${'Price: '.tr}${list['price']} \$'),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'${list['carType']}',
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.greenColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text('📈 ${list['passengerRate']}',
|
||||
style: AppStyle.title),
|
||||
MyElevatedButton(
|
||||
title: 'Accept'.tr,
|
||||
onPressed: () async {
|
||||
box.write(
|
||||
BoxName.statusDriverLocation, 'on');
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text('${'Price: '.tr}${list['price']} \$'),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'${list['carType']}',
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.greenColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text('📈 ${list['passengerRate']}',
|
||||
style: AppStyle.title),
|
||||
MyElevatedButton(
|
||||
title: 'Accept'.tr,
|
||||
onPressed: () async {
|
||||
box.write(
|
||||
BoxName.statusDriverLocation, 'on');
|
||||
|
||||
var res = await CRUD().post(
|
||||
link: AppLink.updateStausFromSpeed,
|
||||
var res = await CRUD().post(
|
||||
link: AppLink.updateStausFromSpeed,
|
||||
payload: {
|
||||
'id': list['id'],
|
||||
'rideTimeStart':
|
||||
DateTime.now().toString(),
|
||||
'status': 'Apply',
|
||||
'driver_id':
|
||||
box.read(BoxName.driverID),
|
||||
});
|
||||
// .then((value) {
|
||||
// var json = jsonDecode(res);
|
||||
if (res == "failure") {
|
||||
Get.defaultDialog(
|
||||
title:
|
||||
"This ride is already taken by another driver."
|
||||
.tr,
|
||||
middleText: '',
|
||||
titleStyle: AppStyle.title,
|
||||
middleTextStyle: AppStyle.title,
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok'.tr,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
// Get.back();
|
||||
// Get.back();
|
||||
}));
|
||||
} else if (jsonDecode(res)['status'] ==
|
||||
"success") {
|
||||
List<String> bodyToPassenger = [
|
||||
box.read(BoxName.driverID).toString(),
|
||||
box
|
||||
.read(BoxName.nameDriver)
|
||||
.toString(),
|
||||
box
|
||||
.read(BoxName.tokenDriver)
|
||||
.toString(),
|
||||
];
|
||||
await CRUD().postFromDialogue(
|
||||
link: AppLink.addDriverOrder,
|
||||
payload: {
|
||||
'id': list['id'],
|
||||
'rideTimeStart':
|
||||
DateTime.now().toString(),
|
||||
'status': 'Apply',
|
||||
'driver_id':
|
||||
box.read(BoxName.driverID),
|
||||
// box.read(BoxName.driverID).toString(),
|
||||
'order_id': list['id'],
|
||||
'status': 'Apply'
|
||||
});
|
||||
await CRUD().post(
|
||||
link: AppLink.updateRides,
|
||||
payload: {
|
||||
'id': list['id'],
|
||||
'DriverIsGoingToPassenger':
|
||||
DateTime.now().toString(),
|
||||
'status': 'Applied'
|
||||
});
|
||||
await CRUD().post(
|
||||
link: AppLink.updateWaitingRide,
|
||||
payload: {
|
||||
'id': list['id'],
|
||||
'status': 'Applied'
|
||||
});
|
||||
// .then((value) {
|
||||
// var json = jsonDecode(res);
|
||||
if (res == "failure") {
|
||||
Get.defaultDialog(
|
||||
title:
|
||||
"This ride is already taken by another driver."
|
||||
.tr,
|
||||
middleText: '',
|
||||
titleStyle: AppStyle.title,
|
||||
middleTextStyle: AppStyle.title,
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok'.tr,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
Get.back();
|
||||
Get.back();
|
||||
}));
|
||||
} else if (jsonDecode(res)['status'] ==
|
||||
"success") {
|
||||
List<String> bodyToPassenger = [
|
||||
box
|
||||
.read(BoxName.driverID)
|
||||
.toString(),
|
||||
box
|
||||
.read(BoxName.nameDriver)
|
||||
.toString(),
|
||||
box
|
||||
.read(BoxName.tokenDriver)
|
||||
.toString(),
|
||||
];
|
||||
await CRUD().postFromDialogue(
|
||||
link: AppLink.addDriverOrder,
|
||||
payload: {
|
||||
'driver_id':
|
||||
box.read(BoxName.driverID),
|
||||
// box.read(BoxName.driverID).toString(),
|
||||
'order_id': list['id'],
|
||||
'status': 'Apply'
|
||||
});
|
||||
await CRUD().post(
|
||||
link: AppLink.updateRides,
|
||||
payload: {
|
||||
'id': list['id'],
|
||||
'DriverIsGoingToPassenger':
|
||||
DateTime.now().toString(),
|
||||
'status': 'Applied'
|
||||
});
|
||||
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Apply Ride',
|
||||
'your ride is applied'.tr,
|
||||
// arguments['DriverList'][9].toString(),
|
||||
list['passengerToken'].toString(),
|
||||
// box.read(BoxName.tokenDriver).toString(),
|
||||
bodyToPassenger,
|
||||
);
|
||||
Get.back();
|
||||
Get.to(
|
||||
() => PassengerLocationMapPage(),
|
||||
arguments: {
|
||||
'passengerLocation':
|
||||
list['start_location']
|
||||
.toString(),
|
||||
'passengerDestination':
|
||||
list['end_location']
|
||||
.toString(),
|
||||
'Duration':
|
||||
list['duration'].toString(),
|
||||
'totalCost':
|
||||
list['price'].toString(),
|
||||
'Distance':
|
||||
list['distance'].toString(),
|
||||
'name': list['first_name']
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Apply Ride',
|
||||
'your ride is applied'.tr,
|
||||
// arguments['DriverList'][9].toString(),
|
||||
list['passengerToken']
|
||||
.toString(),
|
||||
'phone':
|
||||
list['phone'].toString(),
|
||||
'email':
|
||||
list['email'].toString(),
|
||||
'WalletChecked':
|
||||
list['payment_method']
|
||||
.toString(),
|
||||
'tokenPassenger':
|
||||
list['passengerToken']
|
||||
.toString(),
|
||||
'direction':
|
||||
'https://www.google.com/maps/dir/${list['start_location']}/${list['end_location']}/',
|
||||
'DurationToPassenger':
|
||||
list['duration'].toString(),
|
||||
'rideId': list['id'].toString(),
|
||||
'passengerId':
|
||||
list['passenger_id']
|
||||
.toString(),
|
||||
'driverId': box
|
||||
.read(BoxName.driverID)
|
||||
.toString(),
|
||||
'durationOfRideValue':
|
||||
list['duration'].toString(),
|
||||
'paymentAmount':
|
||||
list['price'].toString(),
|
||||
'paymentMethod':
|
||||
'cash'.toString() == //todo fix payment method
|
||||
'true'
|
||||
? 'visa'
|
||||
: 'cash',
|
||||
'isHaveSteps':
|
||||
'startEnd'.toString(),
|
||||
'step0': ''.toString(),
|
||||
'step1': ''.toString(),
|
||||
'step2': ''.toString(),
|
||||
'step3': ''.toString(),
|
||||
'step4': ''.toString(),
|
||||
'passengerWalletBurc':
|
||||
list['bruc'].toString(),
|
||||
'timeOfOrder':
|
||||
DateTime.now().toString(),
|
||||
'totalPassenger':
|
||||
list['price'].toString(),
|
||||
'carType':
|
||||
list['carType'].toString(),
|
||||
'kazan': Get.find<
|
||||
HomeCaptainController>()
|
||||
.kazan
|
||||
.toString(),
|
||||
});
|
||||
}
|
||||
},
|
||||
kolor: AppColor.greenColor,
|
||||
),
|
||||
Text(
|
||||
'📍 ${list['distance']} ${'KM'.tr}',
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.greenColor),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}),
|
||||
)
|
||||
// box.read(BoxName.tokenDriver).toString(),
|
||||
bodyToPassenger,
|
||||
'start.wav');
|
||||
Get.back();
|
||||
Get.to(() => PassengerLocationMapPage(),
|
||||
arguments: {
|
||||
'passengerLocation':
|
||||
list['start_location']
|
||||
.toString(),
|
||||
'passengerDestination':
|
||||
list['end_location']
|
||||
.toString(),
|
||||
'Duration':
|
||||
list['duration'].toString(),
|
||||
'totalCost':
|
||||
list['price'].toString(),
|
||||
'Distance':
|
||||
list['distance'].toString(),
|
||||
'name':
|
||||
list['first_name'].toString(),
|
||||
'phone': list['phone'].toString(),
|
||||
'email': list['email'].toString(),
|
||||
'WalletChecked':
|
||||
list['payment_method']
|
||||
.toString(),
|
||||
'tokenPassenger':
|
||||
list['passengerToken']
|
||||
.toString(),
|
||||
'direction':
|
||||
'https://www.google.com/maps/dir/${list['start_location']}/${list['end_location']}/',
|
||||
'DurationToPassenger':
|
||||
list['duration'].toString(),
|
||||
'rideId': list['id'].toString(),
|
||||
'passengerId':
|
||||
list['passenger_id']
|
||||
.toString(),
|
||||
'driverId': box
|
||||
.read(BoxName.driverID)
|
||||
.toString(),
|
||||
'durationOfRideValue':
|
||||
list['duration'].toString(),
|
||||
'paymentAmount':
|
||||
list['price'].toString(),
|
||||
'paymentMethod':
|
||||
'cash'.toString() == //todo fix payment method
|
||||
'true'
|
||||
? 'visa'
|
||||
: 'cash',
|
||||
'isHaveSteps':
|
||||
'startEnd'.toString(),
|
||||
'step0': ''.toString(),
|
||||
'step1': ''.toString(),
|
||||
'step2': ''.toString(),
|
||||
'step3': ''.toString(),
|
||||
'step4': ''.toString(),
|
||||
'passengerWalletBurc':
|
||||
list['bruc'].toString(),
|
||||
'timeOfOrder':
|
||||
DateTime.now().toString(),
|
||||
'totalPassenger':
|
||||
list['price'].toString(),
|
||||
'carType':
|
||||
list['carType'].toString(),
|
||||
'kazan': Get.find<
|
||||
HomeCaptainController>()
|
||||
.kazan
|
||||
.toString(),
|
||||
});
|
||||
}
|
||||
},
|
||||
kolor: AppColor.greenColor,
|
||||
),
|
||||
Text(
|
||||
'📍 ${list['distance']} ${'KM'.tr}',
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.greenColor),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
})
|
||||
],
|
||||
isleading: true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user