10/3/1
This commit is contained in:
@@ -67,37 +67,27 @@ class TimerToPassengerFromDriver extends StatelessWidget {
|
||||
? MyElevatedButton(
|
||||
title: 'If you in Car Now. Press Start The Ride',
|
||||
onPressed: () async {
|
||||
MapController mapController =
|
||||
Get.find<MapController>();
|
||||
final firebasMessagesController =
|
||||
Get.put(FirebasMessagesController());
|
||||
//todo start the trip and rest all counter ,start new counter of the trip time
|
||||
|
||||
await CRUD()
|
||||
.post(link: AppLink.updateRides, payload: {
|
||||
'id': mapController.rideId,
|
||||
'id': controller.rideId,
|
||||
'rideTimeStart': DateTime.now().toString(),
|
||||
'status': 'Applied'
|
||||
});
|
||||
mapController.driverArrivePassenger();
|
||||
controller.driverArrivePassenger();
|
||||
// Send notification to driver to alert him that trip is begin
|
||||
firebasMessagesController
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToDriverId(
|
||||
'Ride Begin',
|
||||
'BeginTrip',
|
||||
box.read(BoxName.name).toString(),
|
||||
mapController
|
||||
.dataCarsLocationByPassenger['message'][0]
|
||||
['token']
|
||||
.toString(),
|
||||
);
|
||||
print(mapController
|
||||
.dataCarsLocationByPassenger['message'][0]
|
||||
['token']
|
||||
.toString());
|
||||
Get.snackbar(
|
||||
'The Ride is Begin'.tr,
|
||||
'',
|
||||
backgroundColor: AppColor.greenColor,
|
||||
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