4/7/8
This commit is contained in:
@@ -186,8 +186,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
var driverList = jsonDecode(myListString) as List<dynamic>;
|
||||
NotificationController().showNotification(
|
||||
'Driver Finish Trip'.tr,
|
||||
'you will pay to Driver'.tr +
|
||||
' ${Get.find<MapPassengerController>().totalPassenger} \$'.tr,
|
||||
'you will pay to Driver'.tr + ' ${driverList[3].toString()} \$'.tr,
|
||||
'order');
|
||||
Get.find<MapPassengerController>().tripFinishedFromDriver();
|
||||
if (Get.find<PaymentController>().isCashChecked == false &&
|
||||
|
||||
@@ -469,6 +469,7 @@ class MapDriverController extends GetxController {
|
||||
'paymentMethod': paymentMethod,
|
||||
'driverID': box.read(BoxName.driverID).toString(),
|
||||
});
|
||||
print(res);
|
||||
Future.delayed(const Duration(milliseconds: 300));
|
||||
FirebaseMessagesController().sendNotificationToPassengerToken(
|
||||
'Driver Finish Trip',
|
||||
@@ -480,6 +481,9 @@ class MapDriverController extends GetxController {
|
||||
box.read(BoxName.driverID),
|
||||
rideId,
|
||||
box.read(BoxName.tokenDriver),
|
||||
carType == 'Comfort' || carType == 'Mashwari'
|
||||
? price.toStringAsFixed(2)
|
||||
: totalPassenger
|
||||
],
|
||||
);
|
||||
// } else {
|
||||
|
||||
@@ -707,17 +707,17 @@ class MapPassengerController extends GetxController {
|
||||
if (rideStatusFromStartApp['data']['status'] == 'Begin') {
|
||||
statusRide = 'Begin';
|
||||
statusRideFromStart = true;
|
||||
DateTime endTime =
|
||||
DateTime.parse(rideStatusFromStartApp['data']['endtime']);
|
||||
DateTime rideTimeStart =
|
||||
DateTime.parse(rideStatusFromStartApp['data']['rideTimeStart']);
|
||||
|
||||
// Calculate the new end time by adding the duration to the rideTimeStart
|
||||
DateTime newEndTime = rideTimeStart.add(
|
||||
Duration(seconds: endTime.difference(rideTimeStart).inSeconds));
|
||||
|
||||
// Save the new end time in a variable
|
||||
var newEndTimeVariable = newEndTime.toString();
|
||||
// DateTime endTime =
|
||||
// DateTime.parse(rideStatusFromStartApp['data']['endtime']);
|
||||
// DateTime rideTimeStart =
|
||||
// DateTime.parse(rideStatusFromStartApp['data']['rideTimeStart']);
|
||||
//
|
||||
// // Calculate the new end time by adding the duration to the rideTimeStart
|
||||
// DateTime newEndTime = rideTimeStart.add(
|
||||
// Duration(seconds: endTime.difference(rideTimeStart).inSeconds));
|
||||
//
|
||||
// // Save the new end time in a variable
|
||||
// var newEndTimeVariable = newEndTime.toString();
|
||||
update();
|
||||
|
||||
Map<String, dynamic> tripData =
|
||||
@@ -880,6 +880,7 @@ class MapPassengerController extends GetxController {
|
||||
['driver_id']
|
||||
.toString(),
|
||||
"status": "waiting",
|
||||
'carType': box.read(BoxName.carType),
|
||||
"price_for_driver": totalPassenger.toString(),
|
||||
"price_for_passenger": totalME.toString(),
|
||||
"distance": distance.toString()
|
||||
|
||||
@@ -188,7 +188,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
Text(
|
||||
myList[31].toString(),
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.deepPurpleAccent),
|
||||
.copyWith(color: AppColor.greenColor),
|
||||
),
|
||||
],
|
||||
)),
|
||||
|
||||
@@ -188,7 +188,7 @@ class OrderSpeedRequest extends StatelessWidget {
|
||||
Text(
|
||||
myList[31].toString(),
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.deepPurpleAccent),
|
||||
.copyWith(color: AppColor.greenColor),
|
||||
),
|
||||
],
|
||||
)),
|
||||
|
||||
@@ -40,6 +40,7 @@ class RideBeginPassenger extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Container(
|
||||
width: Get.width * .15,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -55,6 +56,7 @@ class RideBeginPassenger extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: Get.width * .15,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -161,7 +163,7 @@ class RideBeginPassenger extends StatelessWidget {
|
||||
} else {
|
||||
String phoneNumber =
|
||||
box.read(BoxName.sosPhonePassenger).toString();
|
||||
phoneNumber = phoneNumber.replaceAll('0', '');
|
||||
// phoneNumber = phoneNumber.replaceAll('0', '');
|
||||
print(phoneNumber); // Output: 798583061
|
||||
var phone =
|
||||
// '+${box.read(BoxName.countryCode)}${box.read(BoxName.sosPhonePassenger)}';
|
||||
|
||||
@@ -57,12 +57,20 @@ class RideFromStartApp extends StatelessWidget {
|
||||
'https://ride.mobile-app.store/portrate_captain_image/${controller.rideStatusFromStartApp['data']['driver_id']}.jpg'),
|
||||
),
|
||||
Text(
|
||||
'${'driver name is'.tr} ${controller.rideStatusFromStartApp['data']['driverName']}',
|
||||
'${controller.rideStatusFromStartApp['data']['driverName']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'driver name is'.tr} ${controller.rideStatusFromStartApp['data']['rateDriver']}',
|
||||
style: AppStyle.title,
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
'${controller.rideStatusFromStartApp['data']['rateDriver']} 📈',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${controller.rideStatusFromStartApp['data']['carType']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -103,7 +111,7 @@ class RideFromStartApp extends StatelessWidget {
|
||||
String phoneNumber = box
|
||||
.read(BoxName.sosPhonePassenger)
|
||||
.toString();
|
||||
phoneNumber = phoneNumber.replaceAll('0', '');
|
||||
// phoneNumber = phoneNumber.replaceAll('0', '');
|
||||
print(phoneNumber); // Output: 798583061
|
||||
var phone =
|
||||
// '+${box.read(BoxName.countryCode)}${box.read(BoxName.sosPhonePassenger)}';
|
||||
|
||||
Reference in New Issue
Block a user