This commit is contained in:
Hamza-Ayed
2024-02-07 00:41:38 +03:00
parent 2820eceee0
commit 63d954e356
3 changed files with 78 additions and 82 deletions

View File

@@ -163,8 +163,6 @@ class MainBottomMenuMap extends StatelessWidget {
onPressed: () {
controller
.changeMainBottomMenuMap();
// controller
// .initilizeGetStorage();
},
icon:
controller.isMainBottomMenuMap

View File

@@ -37,16 +37,17 @@ class TimerToPassengerFromDriver extends StatelessWidget {
'You Can cancel Ride After Captain did not come in the time'
.tr,
style: AppStyle.title,
textAlign: TextAlign.center,
),
Stack(
children: [
LinearProgressIndicator(
backgroundColor: AppColor.accentColor,
color:
controller.timeToPassengerFromDriverAfterApplied <
60
? AppColor.redColor
: AppColor.greenColor,
color: controller
.remainingTimeToPassengerFromDriverAfterApplied <
60
? AppColor.redColor
: AppColor.greenColor,
minHeight: 50,
borderRadius: BorderRadius.circular(15),
value: controller
@@ -61,33 +62,20 @@ 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: 'You can cancel trip'.tr,
onPressed: () async {
// await CRUD()
// .post(link: AppLink.updateRides, payload: {
// 'id': controller.rideId,
// 'rideTimeStart': DateTime.now().toString(),
// 'status': 'Applied'
// });
controller
.calculateDistanceBetweenPassengerAndDriverBeforecancelRide();
})
: const SizedBox()
],
),
),