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 { 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') { if (res != 'failure') {
passengerRate = double.parse(jsonDecode(res)['message'][0]['rating']); passengerRate = double.parse(jsonDecode(res)['message'][0]['rating']);
} }

View File

@@ -252,14 +252,24 @@ class OrderRequestPage extends StatelessWidget {
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
text: 'Passenger Name is '.tr, text: 'Passenger: '.tr, // Changed text to be more generic
style: AppStyle.subtitle, style: AppStyle.subtitle,
children: [ 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(
padding: const EdgeInsets.all(4), padding: const EdgeInsets.all(4),
child: Container( child: Container(

View File

@@ -262,10 +262,19 @@ class OrderSpeedRequest extends StatelessWidget {
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
text: 'Passenger Name is '.tr, text: 'Passenger: '.tr, // Changed text to be more generic
style: AppStyle.subtitle, style: AppStyle.subtitle,
children: [ 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( Column(
children: [ children: [
Text( Text(
// 'You will arrive to your destination after timer end.'.tr, '⏱️ Arrive',
'Time to arrive'.tr,
style: AppStyle.title, style: AppStyle.title,
), ),
Text( Text(
@@ -52,7 +51,7 @@ class RideBeginPassenger extends StatelessWidget {
Column( Column(
children: [ children: [
Text( Text(
'Total Cost'.tr, ' Total',
style: AppStyle.title, style: AppStyle.title,
), ),
Text( Text(
@@ -61,26 +60,16 @@ class RideBeginPassenger extends StatelessWidget {
), ),
], ],
), ),
Row( IconButton(
children: [ onPressed: () => Get.to(
Column( () => FeedBackPage(),
children: [ transition: Transition.downToUp,
Text('Write note'.tr), ),
IconButton( icon: const Icon(
onPressed: () { Icons.note_add,
Get.to( color: AppColor.redColor,
() => FeedBackPage(), ),
transition: Transition.downToUp, tooltip: ' Add Note', // Optional tooltip for clarity
);
},
icon: const Icon(
Icons.note_add,
color: AppColor.redColor,
),
),
],
),
],
), ),
], ],
), ),