This commit is contained in:
Hamza Aleghwairyeen
2024-04-03 23:39:36 +03:00
parent b1d9cb9fca
commit a80bc50c0d
4 changed files with 38 additions and 28 deletions

View File

@@ -2340,7 +2340,9 @@ class MapPassengerController extends GetxController {
}
getPassengerRate() async {
var res = await CRUD().get(link: AppLink.getPassengerRate);
var res = await CRUD().get(
link: AppLink.getPassengerRate,
payload: {'passenger_id': box.read(BoxName.passengerID)});
if (res != 'failure') {
passengerRate = double.parse(jsonDecode(res)['message'][0]['rating']);
}

View File

@@ -252,14 +252,24 @@ class OrderRequestPage extends StatelessWidget {
padding: const EdgeInsets.all(8.0),
child: RichText(
text: TextSpan(
text: 'Passenger Name is '.tr,
text: 'Passenger: '.tr, // Changed text to be more generic
style: AppStyle.subtitle,
children: [
TextSpan(text: myList[8], style: AppStyle.title),
TextSpan(
text: myList[8],
style: AppStyle
.title), // Assuming myList[8] holds passenger name
TextSpan(text: ' (', style: AppStyle.subtitle),
TextSpan(
text: myList[33].toString(),
style: AppStyle
.title), // Assuming 'rate' holds the passenger rate
TextSpan(text: ' ⭐)', style: AppStyle.subtitle),
],
),
),
),
Padding(
padding: const EdgeInsets.all(4),
child: Container(

View File

@@ -262,10 +262,19 @@ class OrderSpeedRequest extends StatelessWidget {
padding: const EdgeInsets.all(8.0),
child: RichText(
text: TextSpan(
text: 'Passenger Name is '.tr,
text: 'Passenger: '.tr, // Changed text to be more generic
style: AppStyle.subtitle,
children: [
TextSpan(text: myList[8], style: AppStyle.title),
TextSpan(
text: myList[8],
style: AppStyle
.title), // Assuming myList[8] holds passenger name
TextSpan(text: ' (', style: AppStyle.subtitle),
TextSpan(
text: myList[33].toString(),
style: AppStyle
.title), // Assuming 'rate' holds the passenger rate
TextSpan(text: ' ⭐)', style: AppStyle.subtitle),
],
),
),

View File

@@ -39,8 +39,7 @@ class RideBeginPassenger extends StatelessWidget {
Column(
children: [
Text(
// 'You will arrive to your destination after timer end.'.tr,
'Time to arrive'.tr,
'⏱️ Arrive',
style: AppStyle.title,
),
Text(
@@ -52,7 +51,7 @@ class RideBeginPassenger extends StatelessWidget {
Column(
children: [
Text(
'Total Cost'.tr,
' Total',
style: AppStyle.title,
),
Text(
@@ -61,26 +60,16 @@ class RideBeginPassenger extends StatelessWidget {
),
],
),
Row(
children: [
Column(
children: [
Text('Write note'.tr),
IconButton(
onPressed: () {
Get.to(
() => FeedBackPage(),
transition: Transition.downToUp,
);
},
icon: const Icon(
Icons.note_add,
color: AppColor.redColor,
),
),
],
),
],
IconButton(
onPressed: () => Get.to(
() => FeedBackPage(),
transition: Transition.downToUp,
),
icon: const Icon(
Icons.note_add,
color: AppColor.redColor,
),
tooltip: ' Add Note', // Optional tooltip for clarity
),
],
),