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