This commit is contained in:
Hamza Aleghwairyeen
2024-04-12 01:19:00 +03:00
parent 0e91e389e5
commit 40ec1a5362
4 changed files with 168 additions and 123 deletions

View File

@@ -838,13 +838,24 @@ class MapPassengerController extends GetxController {
title: title, title: title,
titleStyle: AppStyle.title, titleStyle: AppStyle.title,
middleTextStyle: AppStyle.title, middleTextStyle: AppStyle.title,
content: IconButton( content: Column(
children: [
IconButton(
onPressed: () async { onPressed: () async {
await textToSpeechController.speakText(midTitle); await textToSpeechController.speakText(midTitle);
}, },
icon: const Icon(Icons.headphones)), icon: const Icon(Icons.headphones)),
middleText: midTitle, Text(
confirm: MyElevatedButton(title: 'Ok'.tr, onPressed: onPressed), midTitle,
style: AppStyle.title,
)
],
),
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: onPressed,
kolor: AppColor.greenColor,
),
cancel: MyElevatedButton( cancel: MyElevatedButton(
title: 'Cancel', title: 'Cancel',
onPressed: () { onPressed: () {

View File

@@ -442,6 +442,8 @@ class MyTranslation extends Translations {
'Total points is ': "إجمالي النقاط هو", 'Total points is ': "إجمالي النقاط هو",
'Total Connection Duration:': "إجمالي مدة الإتصال:", 'Total Connection Duration:': "إجمالي مدة الإتصال:",
' H and': "ساعة و", ' H and': "ساعة و",
'Arrival time': 'وقت الوصول ',
'arrival time to reach your point': 'الوقت المتوقع للوصول إلى وجهتك ',
'For Speed and Delivery trips, the price is calculated dynamically. For Comfort trips, the price is based on time and distance': 'For Speed and Delivery trips, the price is calculated dynamically. For Comfort trips, the price is based on time and distance':
'بالنسبة لرحلات Speed والتوصيل، يتم حساب السعر بشكل ديناميكي. أما بالنسبة لرحلات الراحة، فيتم حساب السعر بناءً على الوقت والمسافة.', 'بالنسبة لرحلات Speed والتوصيل، يتم حساب السعر بشكل ديناميكي. أما بالنسبة لرحلات الراحة، فيتم حساب السعر بناءً على الوقت والمسافة.',
'Hello this is Driver': "مرحبا هذا السائق", 'Hello this is Driver': "مرحبا هذا السائق",

View File

@@ -62,7 +62,9 @@ GetBuilder<MapDriverController> driverEndRideBar() {
], ],
) )
: const SizedBox(), : const SizedBox(),
Row( mapDriverController.carType != 'Mashwari' ||
mapDriverController.carType != 'Comfort'
? Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
Container( Container(
@@ -106,7 +108,8 @@ GetBuilder<MapDriverController> driverEndRideBar() {
children: [ children: [
const Icon(Icons.attach_money), const Icon(Icons.attach_money),
Text( Text(
mapDriverController.price.toStringAsFixed(2), mapDriverController.price
.toStringAsFixed(2),
style: AppStyle.number, style: AppStyle.number,
), ),
], ],
@@ -114,7 +117,8 @@ GetBuilder<MapDriverController> driverEndRideBar() {
), ),
), ),
], ],
), )
: const SizedBox(),
(mapDriverController.carType == 'Mashwari' || (mapDriverController.carType == 'Mashwari' ||
mapDriverController.carType == 'Comfort') && mapDriverController.carType == 'Comfort') &&
mapDriverController.remainingTimeTimerRideBegin > 60 mapDriverController.remainingTimeTimerRideBegin > 60
@@ -163,7 +167,9 @@ GetBuilder<MapDriverController> driverEndRideBar() {
mapDriverController.carType != 'Mashwari' mapDriverController.carType != 'Mashwari'
? Stack( ? Stack(
children: [ children: [
LinearProgressIndicator( SizedBox(
width: Get.width * .9,
child: LinearProgressIndicator(
backgroundColor: AppColor.accentColor, backgroundColor: AppColor.accentColor,
color: mapDriverController color: mapDriverController
.remainingTimeTimerRideBegin < .remainingTimeTimerRideBegin <
@@ -171,11 +177,12 @@ GetBuilder<MapDriverController> driverEndRideBar() {
? AppColor.redColor ? AppColor.redColor
: AppColor.greenColor, : AppColor.greenColor,
minHeight: 25, minHeight: 25,
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(6),
value: mapDriverController value: mapDriverController
.progressTimerRideBegin .progressTimerRideBegin
.toDouble(), .toDouble(),
), ),
),
Center( Center(
child: Text( child: Text(
mapDriverController mapDriverController

View File

@@ -73,6 +73,16 @@ class RideBeginPassenger extends StatelessWidget {
), ),
], ],
), ),
Container(
decoration: AppStyle.boxDecoration1,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 4),
child: Text(
controller.licensePlate,
style: AppStyle.title,
),
),
),
Column( Column(
children: [ children: [
Container( Container(
@@ -99,7 +109,12 @@ class RideBeginPassenger extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
Container( InkWell(
onTap: () {
controller.getDialog('Arrival time'.tr,
'arrival time to reach your point'.tr, () {});
},
child: Container(
width: Get.width * .15, width: Get.width * .15,
decoration: AppStyle.boxDecoration1, decoration: AppStyle.boxDecoration1,
child: Column( child: Column(
@@ -115,6 +130,7 @@ class RideBeginPassenger extends StatelessWidget {
], ],
), ),
), ),
),
InkWell( InkWell(
onTap: () { onTap: () {
controller.getDialog( controller.getDialog(
@@ -208,7 +224,10 @@ class RideBeginPassenger extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
IconButton( Container(
decoration: AppStyle.boxDecoration1,
width: Get.width * .15,
child: IconButton(
onPressed: () async { onPressed: () async {
if (box.read(BoxName.sosPhonePassenger) == null) { if (box.read(BoxName.sosPhonePassenger) == null) {
{ {
@@ -227,7 +246,11 @@ class RideBeginPassenger extends StatelessWidget {
color: AppColor.redColor, color: AppColor.redColor,
), ),
), ),
IconButton( ),
Container(
decoration: AppStyle.boxDecoration1,
width: Get.width * .15,
child: IconButton(
onPressed: () async { onPressed: () async {
print(box.read(BoxName.sosPhonePassenger)); print(box.read(BoxName.sosPhonePassenger));
if (box.read(BoxName.sosPhonePassenger) == null || if (box.read(BoxName.sosPhonePassenger) == null ||
@@ -239,13 +262,14 @@ class RideBeginPassenger extends StatelessWidget {
profileController.prfoileData['sosPhone']); profileController.prfoileData['sosPhone']);
} }
} else { } else {
String phoneNumber = String phoneNumber = box
box.read(BoxName.sosPhonePassenger).toString(); .read(BoxName.sosPhonePassenger)
.toString();
// phoneNumber = phoneNumber.replaceAll('0', ''); // phoneNumber = phoneNumber.replaceAll('0', '');
print(phoneNumber); // Output: 798583061 print(phoneNumber); // Output: 798583061
var phone = var phone =
// '+${box.read(BoxName.countryCode)}${box.read(BoxName.sosPhonePassenger)}'; // '+${box.read(BoxName.countryCode)}${box.read(BoxName.sosPhonePassenger)}';
'+20${box.read(BoxName.sosPhonePassenger)}'; '${box.read(BoxName.sosPhonePassenger)}';
controller.sendWhatsapp(phone); controller.sendWhatsapp(phone);
} }
}, },
@@ -254,6 +278,7 @@ class RideBeginPassenger extends StatelessWidget {
color: AppColor.greenColor, color: AppColor.greenColor,
), ),
), ),
),
], ],
) )
], ],