4/11/7
This commit is contained in:
@@ -838,13 +838,24 @@ class MapPassengerController extends GetxController {
|
||||
title: title,
|
||||
titleStyle: AppStyle.title,
|
||||
middleTextStyle: AppStyle.title,
|
||||
content: IconButton(
|
||||
onPressed: () async {
|
||||
await textToSpeechController.speakText(midTitle);
|
||||
},
|
||||
icon: const Icon(Icons.headphones)),
|
||||
middleText: midTitle,
|
||||
confirm: MyElevatedButton(title: 'Ok'.tr, onPressed: onPressed),
|
||||
content: Column(
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await textToSpeechController.speakText(midTitle);
|
||||
},
|
||||
icon: const Icon(Icons.headphones)),
|
||||
Text(
|
||||
midTitle,
|
||||
style: AppStyle.title,
|
||||
)
|
||||
],
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok'.tr,
|
||||
onPressed: onPressed,
|
||||
kolor: AppColor.greenColor,
|
||||
),
|
||||
cancel: MyElevatedButton(
|
||||
title: 'Cancel',
|
||||
onPressed: () {
|
||||
|
||||
@@ -442,6 +442,8 @@ class MyTranslation extends Translations {
|
||||
'Total points is ': "إجمالي النقاط هو",
|
||||
'Total Connection Duration:': "إجمالي مدة الإتصال:",
|
||||
' 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':
|
||||
'بالنسبة لرحلات Speed والتوصيل، يتم حساب السعر بشكل ديناميكي. أما بالنسبة لرحلات الراحة، فيتم حساب السعر بناءً على الوقت والمسافة.',
|
||||
'Hello this is Driver': "مرحبا هذا السائق",
|
||||
|
||||
@@ -62,59 +62,63 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Container(
|
||||
width: Get.width * .2,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.timer),
|
||||
Text(
|
||||
mapDriverController
|
||||
.stringRemainingTimeRideBegin1,
|
||||
style: AppStyle.number,
|
||||
mapDriverController.carType != 'Mashwari' ||
|
||||
mapDriverController.carType != 'Comfort'
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Container(
|
||||
width: Get.width * .2,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.timer),
|
||||
Text(
|
||||
mapDriverController
|
||||
.stringRemainingTimeRideBegin1,
|
||||
style: AppStyle.number,
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
Container(
|
||||
width: Get.width * .2,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.location_on),
|
||||
Text(
|
||||
'${mapDriverController.recentDistanceToDash.toStringAsFixed(0)} ${'KM'.tr}',
|
||||
style: AppStyle.number,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
Container(
|
||||
width: Get.width * .2,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.location_on),
|
||||
Text(
|
||||
'${mapDriverController.recentDistanceToDash.toStringAsFixed(0)} ${'KM'.tr}',
|
||||
style: AppStyle.number,
|
||||
Container(
|
||||
width: Get.width * .2,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.attach_money),
|
||||
Text(
|
||||
mapDriverController.price
|
||||
.toStringAsFixed(2),
|
||||
style: AppStyle.number,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: Get.width * .2,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.attach_money),
|
||||
Text(
|
||||
mapDriverController.price.toStringAsFixed(2),
|
||||
style: AppStyle.number,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
(mapDriverController.carType == 'Mashwari' ||
|
||||
mapDriverController.carType == 'Comfort') &&
|
||||
mapDriverController.remainingTimeTimerRideBegin > 60
|
||||
@@ -163,18 +167,21 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
mapDriverController.carType != 'Mashwari'
|
||||
? Stack(
|
||||
children: [
|
||||
LinearProgressIndicator(
|
||||
backgroundColor: AppColor.accentColor,
|
||||
color: mapDriverController
|
||||
.remainingTimeTimerRideBegin <
|
||||
60
|
||||
? AppColor.redColor
|
||||
: AppColor.greenColor,
|
||||
minHeight: 25,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
value: mapDriverController
|
||||
.progressTimerRideBegin
|
||||
.toDouble(),
|
||||
SizedBox(
|
||||
width: Get.width * .9,
|
||||
child: LinearProgressIndicator(
|
||||
backgroundColor: AppColor.accentColor,
|
||||
color: mapDriverController
|
||||
.remainingTimeTimerRideBegin <
|
||||
60
|
||||
? AppColor.redColor
|
||||
: AppColor.greenColor,
|
||||
minHeight: 25,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
value: mapDriverController
|
||||
.progressTimerRideBegin
|
||||
.toDouble(),
|
||||
),
|
||||
),
|
||||
Center(
|
||||
child: Text(
|
||||
|
||||
@@ -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(
|
||||
children: [
|
||||
Container(
|
||||
@@ -99,20 +109,26 @@ class RideBeginPassenger extends StatelessWidget {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Container(
|
||||
width: Get.width * .15,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'⏱️',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
controller.arrivalTime,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.getDialog('Arrival time'.tr,
|
||||
'arrival time to reach your point'.tr, () {});
|
||||
},
|
||||
child: Container(
|
||||
width: Get.width * .15,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'⏱️',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
controller.arrivalTime,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
@@ -208,50 +224,59 @@ class RideBeginPassenger extends StatelessWidget {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
if (box.read(BoxName.sosPhonePassenger) == null) {
|
||||
{
|
||||
await profileController.updatField(
|
||||
'sosPhone', TextInputType.phone);
|
||||
box.write(BoxName.sosPhonePassenger,
|
||||
profileController.prfoileData['sosPhone']);
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
width: Get.width * .15,
|
||||
child: IconButton(
|
||||
onPressed: () async {
|
||||
if (box.read(BoxName.sosPhonePassenger) == null) {
|
||||
{
|
||||
await profileController.updatField(
|
||||
'sosPhone', TextInputType.phone);
|
||||
box.write(BoxName.sosPhonePassenger,
|
||||
profileController.prfoileData['sosPhone']);
|
||||
}
|
||||
} else {
|
||||
controller
|
||||
.sendSMS(box.read(BoxName.sosPhonePassenger));
|
||||
}
|
||||
} else {
|
||||
controller
|
||||
.sendSMS(box.read(BoxName.sosPhonePassenger));
|
||||
}
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.sos_rounded,
|
||||
color: AppColor.redColor,
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.sos_rounded,
|
||||
color: AppColor.redColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
print(box.read(BoxName.sosPhonePassenger));
|
||||
if (box.read(BoxName.sosPhonePassenger) == null ||
|
||||
box.read(BoxName.sosPhonePassenger) == 'sos') {
|
||||
{
|
||||
await profileController.updatField(
|
||||
'sosPhone', TextInputType.phone);
|
||||
box.write(BoxName.sosPhonePassenger,
|
||||
profileController.prfoileData['sosPhone']);
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
width: Get.width * .15,
|
||||
child: IconButton(
|
||||
onPressed: () async {
|
||||
print(box.read(BoxName.sosPhonePassenger));
|
||||
if (box.read(BoxName.sosPhonePassenger) == null ||
|
||||
box.read(BoxName.sosPhonePassenger) == 'sos') {
|
||||
{
|
||||
await profileController.updatField(
|
||||
'sosPhone', TextInputType.phone);
|
||||
box.write(BoxName.sosPhonePassenger,
|
||||
profileController.prfoileData['sosPhone']);
|
||||
}
|
||||
} else {
|
||||
String phoneNumber = box
|
||||
.read(BoxName.sosPhonePassenger)
|
||||
.toString();
|
||||
// phoneNumber = phoneNumber.replaceAll('0', '');
|
||||
print(phoneNumber); // Output: 798583061
|
||||
var phone =
|
||||
// '+${box.read(BoxName.countryCode)}${box.read(BoxName.sosPhonePassenger)}';
|
||||
'${box.read(BoxName.sosPhonePassenger)}';
|
||||
controller.sendWhatsapp(phone);
|
||||
}
|
||||
} else {
|
||||
String phoneNumber =
|
||||
box.read(BoxName.sosPhonePassenger).toString();
|
||||
// phoneNumber = phoneNumber.replaceAll('0', '');
|
||||
print(phoneNumber); // Output: 798583061
|
||||
var phone =
|
||||
// '+${box.read(BoxName.countryCode)}${box.read(BoxName.sosPhonePassenger)}';
|
||||
'+20${box.read(BoxName.sosPhonePassenger)}';
|
||||
controller.sendWhatsapp(phone);
|
||||
}
|
||||
},
|
||||
icon: const Icon(
|
||||
FontAwesome.whatsapp,
|
||||
color: AppColor.greenColor,
|
||||
},
|
||||
icon: const Icon(
|
||||
FontAwesome.whatsapp,
|
||||
color: AppColor.greenColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user