This commit is contained in:
Hamza Aleghwairyeen
2024-04-09 02:52:52 +03:00
parent 207a87a5f0
commit d68eb5028f
11 changed files with 249 additions and 164 deletions

View File

@@ -21,8 +21,8 @@ GetBuilder<MapDriverController> driverEndRideBar() {
child: Container(
decoration: AppStyle.boxDecoration,
height: mapDriverController.remainingTimeTimerRideBegin < 60
? mapDriverController.driverEndPage = 180
: 150,
? mapDriverController.driverEndPage = 190
: 170,
width: 240,
child: Column(
children: [
@@ -70,7 +70,7 @@ GetBuilder<MapDriverController> driverEndRideBar() {
Text(mapDriverController.price.toStringAsFixed(2)),
],
),
(mapDriverController.carType == 'Free Ride' ||
(mapDriverController.carType == 'Mashwari' ||
mapDriverController.carType == 'Comfort') &&
mapDriverController.remainingTimeTimerRideBegin > 60
? Row(

View File

@@ -200,7 +200,7 @@ class OrderRequestPage extends StatelessWidget {
)),
),
Container(
height: Get.height * .15,
height: Get.height * .2,
width: Get.width * .9,
decoration: AppStyle.boxDecoration1,
child: Column(
@@ -284,7 +284,10 @@ class OrderRequestPage extends StatelessWidget {
style: AppStyle.title,
children: [
TextSpan(
text: (mpg * double.parse(myList[5]))
text: ((Get.find<HomeCaptainController>()
.fuelPrice /
12) *
double.parse(myList[5]))
.toStringAsFixed(2),
style: AppStyle.headTitle2),
],

View File

@@ -81,11 +81,11 @@ class OrderSpeedRequest extends StatelessWidget {
endIcon = value;
});
// }
double mpg = 0;
calculateConsumptionFuel() {
mpg = Get.find<HomeCaptainController>().fuelPrice /
12; //todo in register car add mpg in box
}
// double mpg = 0;
// calculateConsumptionFuel() {
// mpg = Get.find<HomeCaptainController>().fuelPrice /
// 12; //todo in register car add mpg in box
// }
return MyScafolld(
title: 'Order Details'.tr,
@@ -199,7 +199,7 @@ class OrderSpeedRequest extends StatelessWidget {
)),
),
Container(
height: Get.height * .15,
height: Get.height * .2,
width: Get.width * .9,
decoration: AppStyle.boxDecoration1,
child: Column(
@@ -292,8 +292,11 @@ class OrderSpeedRequest extends StatelessWidget {
style: AppStyle.title,
children: [
TextSpan(
text: (mpg * double.parse(myList[5]))
.toStringAsFixed(2),
text:
((Get.find<HomeCaptainController>().fuelPrice /
12) *
double.parse(myList[5]))
.toStringAsFixed(2),
style: AppStyle.headTitle2),
],
),

View File

@@ -33,8 +33,8 @@ List<CarType> carTypes = [
carDetail: 'Delivery service'.tr,
image: 'assets/images/moto.png'),
CarType(
carType: 'Free Ride',
carDetail: 'free ride without end point'.tr,
carType: 'Mashwari',
carDetail: 'Mashwari without end point'.tr,
image: 'assets/images/freeRide.png'),
];

View File

@@ -84,8 +84,8 @@ class RideBeginPassenger extends StatelessWidget {
),
audioController.isRecording == false
? IconButton(
onPressed: () {
audioController.startRecording();
onPressed: () async {
await audioController.startRecording();
},
icon: const Icon(
Icons.play_circle_fill_outlined,
@@ -95,8 +95,8 @@ class RideBeginPassenger extends StatelessWidget {
' Add Note', // Optional tooltip for clarity
)
: IconButton(
onPressed: () {
audioController.stopRecording();
onPressed: () async {
await audioController.stopRecording();
},
icon: const Icon(
Icons.stop_circle,