11/1/6
This commit is contained in:
@@ -61,33 +61,33 @@ class TimerToPassengerFromDriver extends StatelessWidget {
|
||||
)
|
||||
],
|
||||
),
|
||||
controller.remainingTimeToPassengerFromDriverAfterApplied < 60
|
||||
? MyElevatedButton(
|
||||
title: 'If you in Car Now. Press Start The Ride'.tr,
|
||||
onPressed: () async {
|
||||
//todo start the trip and rest all counter ,start new counter of the trip time
|
||||
|
||||
await CRUD()
|
||||
.post(link: AppLink.updateRides, payload: {
|
||||
'id': controller.rideId,
|
||||
'rideTimeStart': DateTime.now().toString(),
|
||||
'status': 'Applied'
|
||||
});
|
||||
controller.driverArrivePassenger();
|
||||
// Send notification to driver to alert him that trip is begin
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToAnyWithoutData(
|
||||
'BeginTrip',
|
||||
box.read(BoxName.name).toString(),
|
||||
controller.driverToken.toString(),
|
||||
);
|
||||
print(controller.driverToken.toString());
|
||||
// Get.defaultDialog(
|
||||
// title: 'The Ride is Begin'.tr,
|
||||
// backgroundColor: AppColor.greenColor,
|
||||
// );
|
||||
})
|
||||
: const SizedBox()
|
||||
// controller.remainingTimeToPassengerFromDriverAfterApplied < 60
|
||||
// ? MyElevatedButton(
|
||||
// title: 'If you in Car Now. Press Start The Ride'.tr,
|
||||
// onPressed: () async {
|
||||
// //todo start the trip and rest all counter ,start new counter of the trip time
|
||||
//
|
||||
// await CRUD()
|
||||
// .post(link: AppLink.updateRides, payload: {
|
||||
// 'id': controller.rideId,
|
||||
// 'rideTimeStart': DateTime.now().toString(),
|
||||
// 'status': 'Applied'
|
||||
// });
|
||||
// controller.driverArrivePassenger();
|
||||
// // Send notification to driver to alert him that trip is begin
|
||||
// FirebaseMessagesController()
|
||||
// .sendNotificationToAnyWithoutData(
|
||||
// 'BeginTrip',
|
||||
// box.read(BoxName.name).toString(),
|
||||
// controller.driverToken.toString(),
|
||||
// );
|
||||
// print(controller.driverToken.toString());
|
||||
// // Get.defaultDialog(
|
||||
// // title: 'The Ride is Begin'.tr,
|
||||
// // backgroundColor: AppColor.greenColor,
|
||||
// // );
|
||||
// })
|
||||
// : const SizedBox()
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user