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