This commit is contained in:
Hamza Aleghwairyeen
2024-04-12 00:52:03 +03:00
parent 0d0eaa6268
commit 0e91e389e5
6 changed files with 132 additions and 59 deletions

View File

@@ -73,8 +73,11 @@ GetBuilder<MapDriverController> driverEndRideBar() {
child: Row(
children: [
const Icon(Icons.timer),
Text(mapDriverController
.stringRemainingTimeRideBegin1),
Text(
mapDriverController
.stringRemainingTimeRideBegin1,
style: AppStyle.number,
),
],
),
)),
@@ -87,7 +90,9 @@ GetBuilder<MapDriverController> driverEndRideBar() {
children: [
const Icon(Icons.location_on),
Text(
'${mapDriverController.recentDistanceToDash.toStringAsFixed(0)} ${'KM'.tr}'),
'${mapDriverController.recentDistanceToDash.toStringAsFixed(0)} ${'KM'.tr}',
style: AppStyle.number,
),
],
),
),
@@ -100,8 +105,10 @@ GetBuilder<MapDriverController> driverEndRideBar() {
child: Row(
children: [
const Icon(Icons.attach_money),
Text(mapDriverController.price
.toStringAsFixed(2)),
Text(
mapDriverController.price.toStringAsFixed(2),
style: AppStyle.number,
),
],
),
),

View File

@@ -1,10 +1,12 @@
import 'package:SEFER/views/home/profile/feed_back_page.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart';
import 'package:flutter/material.dart';
import 'package:flutter_font_icons/flutter_font_icons.dart';
import 'package:get/get.dart';
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/controller/profile/profile_controller.dart';
import 'package:SEFER/main.dart';
import 'package:get/get_rx/src/rx_typedefs/rx_typedefs.dart';
import '../../../constant/colors.dart';
import '../../../constant/style.dart';
@@ -44,16 +46,32 @@ class RideBeginPassenger extends StatelessWidget {
backgroundImage: NetworkImage(
'https://ride.mobile-app.store/portrate_captain_image/${controller.driverId}.jpg'),
),
Container(
decoration: AppStyle.boxDecoration1,
child: Column(
children: [
Text(
Column(
children: [
Container(
decoration: AppStyle.boxDecoration1,
child: Text(
controller.firstName,
style: AppStyle.title,
),
],
),
),
Container(
decoration: AppStyle.boxDecoration1,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
controller.make,
style: AppStyle.title,
),
Text(
controller.model,
style: AppStyle.title,
),
],
),
),
],
),
Column(
children: [
@@ -97,56 +115,74 @@ class RideBeginPassenger extends StatelessWidget {
],
),
),
InkWell(
onTap: () {
controller.getDialog(
'Price of trip'.tr,
'For Speed and Delivery trips, the price is calculated dynamically. For Comfort trips, the price is based on time and distance'
.tr, () {
Get.back();
});
},
child: Container(
width: Get.width * .15,
decoration: AppStyle.boxDecoration1,
child: Column(
children: [
Text(
'💵 ',
style: AppStyle.title,
),
Text(
controller.totalPassenger.toStringAsFixed(2),
style: AppStyle.title,
),
],
),
),
),
Container(
width: Get.width * .15,
decoration: AppStyle.boxDecoration1,
child: Column(
children: [
Text(
'💵 ',
style: AppStyle.title,
),
Text(
controller.totalPassenger.toStringAsFixed(2),
style: AppStyle.title,
),
],
child: IconButton(
onPressed: () => Get.to(
() => FeedBackPage(),
transition: Transition.downToUp,
),
icon: const Icon(
Icons.note_add,
color: AppColor.redColor,
),
tooltip: ' Add Note', // Optional tooltip for clarity
),
),
IconButton(
onPressed: () => Get.to(
() => FeedBackPage(),
transition: Transition.downToUp,
),
icon: const Icon(
Icons.note_add,
color: AppColor.redColor,
),
tooltip: ' Add Note', // Optional tooltip for clarity
Container(
width: Get.width * .15,
decoration: AppStyle.boxDecoration1,
child: audioController.isRecording == false
? IconButton(
onPressed: () async {
await audioController.startRecording();
},
icon: const Icon(
Icons.play_circle_fill_outlined,
color: AppColor.greenColor,
),
tooltip:
' Add Note', // Optional tooltip for clarity
)
: IconButton(
onPressed: () async {
await audioController.stopRecording();
},
icon: const Icon(
Icons.stop_circle,
color: AppColor.greenColor,
),
tooltip:
' Add Note', // Optional tooltip for clarity
),
),
audioController.isRecording == false
? IconButton(
onPressed: () async {
await audioController.startRecording();
},
icon: const Icon(
Icons.play_circle_fill_outlined,
color: AppColor.greenColor,
),
tooltip:
' Add Note', // Optional tooltip for clarity
)
: IconButton(
onPressed: () async {
await audioController.stopRecording();
},
icon: const Icon(
Icons.stop_circle,
color: AppColor.greenColor,
),
tooltip:
' Add Note', // Optional tooltip for clarity
),
],
),
Stack(