This commit is contained in:
Hamza Aleghwairyeen
2024-04-08 16:45:16 +03:00
parent ebf6b6cdb5
commit 694e18ae1f
5 changed files with 150 additions and 137 deletions

View File

@@ -39,29 +39,35 @@ class RideBeginPassenger extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Column(
children: [
Text(
'⏱️ Arrive',
style: AppStyle.title,
),
Text(
controller.arrivalTime,
style: AppStyle.title,
),
],
Container(
decoration: AppStyle.boxDecoration1,
child: Column(
children: [
Text(
'⏱️',
style: AppStyle.title,
),
Text(
controller.arrivalTime,
style: AppStyle.title,
),
],
),
),
Column(
children: [
Text(
' Total',
style: AppStyle.title,
),
Text(
controller.totalPassenger.toStringAsFixed(2),
style: AppStyle.title,
),
],
Container(
decoration: AppStyle.boxDecoration1,
child: Column(
children: [
Text(
'💵 ',
style: AppStyle.title,
),
Text(
controller.totalPassenger.toStringAsFixed(2),
style: AppStyle.title,
),
],
),
),
IconButton(
onPressed: () => Get.to(
@@ -131,44 +137,6 @@ class RideBeginPassenger extends StatelessWidget {
box.write(BoxName.sosPhonePassenger,
profileController.prfoileData['sosPhone']);
}
// Get.defaultDialog(
// title: 'You dont Add Emergency Phone Yet!'.tr,
// content: Column(
// children: [
// Form(
// key: controller.sosFormKey,
// child: TextFormField(
// keyboardType: TextInputType
// .phone, // Set the keyboard type to phone
// controller:
// controller.sosPhonePassengerProfile,
// validator: (value) {
// if (value!.isEmpty ||
// value.length != 10) {
// return 'Please enter a valid phone number'
// .tr;
// }
// // Add additional validation if needed
// return null;
// },
// decoration: const InputDecoration(
// border: OutlineInputBorder(),
// hintText: 'Type here',
// ),
// ),
// )
// ],
// ),
// confirm: MyElevatedButton(
// title: 'Add Phone'.tr,
// onPressed: () async {
// await profileController
// .updatField('sosPhone');
// box.write(
// BoxName.sosPhonePassenger,
// profileController
// .prfoileData['sosPhone']);
// }));
} else {
controller
.sendSMS(box.read(BoxName.sosPhonePassenger));
@@ -208,34 +176,6 @@ class RideBeginPassenger extends StatelessWidget {
),
],
)
// controller.remainingTimeTimerRideBegin < 5
// ? MyElevatedButton(
// title:
// 'If you in destination Now. Press finish The Ride',
// onPressed: () async {
//todo finish 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()
],
),
),