This commit is contained in:
Hamza-Ayed
2024-10-10 16:22:30 +03:00
parent ebb57a699b
commit 9b0caf3bed
21 changed files with 1142 additions and 630 deletions

View File

@@ -220,7 +220,7 @@ class OrderSpeedRequest extends StatelessWidget {
height: 5,
),
Container(
height: Get.height * .15,
height: Get.height * .2,
width: Get.width * .9,
decoration: AppStyle.boxDecoration1,
child: Padding(
@@ -301,40 +301,40 @@ class OrderSpeedRequest extends StatelessWidget {
),
),
Padding(
padding: const EdgeInsets.all(4),
child: Container(
color: AppColor.greenColor.withOpacity(.5),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
RichText(
text: TextSpan(
text: 'Cost Of Trip IS '.tr,
style: AppStyle.title,
children: [
TextSpan(
text: myList[26], style: AppStyle.headTitle2),
],
),
),
RichText(
text: TextSpan(
text: 'Total net'.tr,
style: AppStyle.title,
children: [
TextSpan(
text: (double.parse(myList[2]) -
double.parse(myList[32]))
.toStringAsFixed(2),
style: AppStyle.headTitle2),
],
),
),
],
),
),
),
// Padding(
// padding: const EdgeInsets.all(4),
// child: Container(
// color: AppColor.greenColor.withOpacity(.5),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// children: [
// RichText(
// text: TextSpan(
// text: 'Cost Of Trip IS '.tr,
// style: AppStyle.title,
// children: [
// TextSpan(
// text: myList[26], style: AppStyle.headTitle2),
// ],
// ),
// ),
// RichText(
// text: TextSpan(
// text: 'Total net'.tr,
// style: AppStyle.title,
// children: [
// TextSpan(
// text: (double.parse(myList[2]) -
// double.parse(myList[32]))
// .toStringAsFixed(2),
// style: AppStyle.headTitle2),
// ],
// ),
// ),
// ],
// ),
// ),
// ),
Padding(
padding: const EdgeInsets.all(8.0),
@@ -531,33 +531,52 @@ class OrderSpeedRequest extends StatelessWidget {
MyElevatedButton(
title: 'Refuse Order'.tr,
onPressed: () async {
Get.defaultDialog(
title: 'Reject Order'.tr,
titleStyle: AppStyle.title,
content: Column(
children: [
IconButton(
onPressed: () async {
await Get.find<TextToSpeechController>()
.speakText(
'You can decline a request without any cost'
.tr);
},
icon: const Icon(Icons.headphones),
),
Text(
'You can decline a request without any cost'
.tr,
style: AppStyle.title,
)
],
),
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.back();
Get.back();
}));
// Get.defaultDialog(
// title: 'Reject Order'.tr,
// titleStyle: AppStyle.title,
// content: Column(
// children: [
// IconButton(
// onPressed: () async {
// await Get.find<TextToSpeechController>()
// .speakText(
// 'You can decline a request without any cost'
// .tr);
// },
// icon: const Icon(Icons.headphones),
// ),
// Text(
// 'You can decline a request without any cost'
// .tr,
// style: AppStyle.title,
// )
// ],
// ),
// confirm: MyElevatedButton(
// title: 'Ok'.tr,
// onPressed: () {
// Get.back();
// Get.back();
// }));
orderRequestController.endTimer();
orderRequestController.refuseOrder(
myList[16].toString(),
);
orderRequestController.addRideToNotificationDriverString(
myList[16].toString(),
myList[29].toString(),
myList[30].toString(),
'${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day}',
'${DateTime.now().hour}:${DateTime.now().minute}',
myList[2].toString(),
myList[7].toString(),
'wait',
myList[31].toString(),
myList[33].toString(),
myList[2].toString(),
myList[5].toString(),
myList[4].toString());
},
kolor: AppColor.redColor,
),