4/10/5
This commit is contained in:
4
.env
4
.env
@@ -9,7 +9,7 @@ transactionCloude=Qhcwilomqcoib:QVO_JNYED2XWA26YXKC2TP:YK1DVH6SJB31N3PE1UXrXlBl
|
|||||||
visionApi=3pALsqSSYTvzp69Q5FMIgbzjG6Z1zktJXrXlBl
|
visionApi=3pALsqSSYTvzp69Q5FMIgbzjG6Z1zktJXrXlBl
|
||||||
chatGPTkeySefer=zg-IiR34ooza3Yvhvb9rZk1C9XrxgUE0l8jRRZrHj3Qe5QXPlqVXrXlBl
|
chatGPTkeySefer=zg-IiR34ooza3Yvhvb9rZk1C9XrxgUE0l8jRRZrHj3Qe5QXPlqVXrXlBl
|
||||||
chatGPTkeySeferNew=zg-Z4AJcAROgNXjgrEIU8fKC9XrxgUE4Qtrrlq1yiux0jL3dITSXrXlBl
|
chatGPTkeySeferNew=zg-Z4AJcAROgNXjgrEIU8fKC9XrxgUE4Qtrrlq1yiux0jL3dITSXrXlBl
|
||||||
secretKey=mk_femf_56O3CFOSBEVrOUA5MDgaoMM14xXHRzhNy7Fl5OSmcZzjqLpu9RyDTC8ttuP80Fp20FN6PQoNo2eTHllRiQs8rBTPX99Lr4CS8x7DlDrXrXrXlBl
|
secretKey=zg_ropj_57Iiv6MFCBFq3C2n6IXlmjykpxDmW93SW3vvXh68UA9T5FORTWgWsT37StKsOPdwDdsy8qR9srMUluahs3nPHvgBa33tGk90vV5XrXlBl
|
||||||
stripe_publishableKe=vg_ropj_57Iiv6MFCBFq3C2n6kNJnZByV6nuDtXe9IjEPOfhmpDtWmt3MLR0gQpiHcQmAFMUPrZc3QiCDjxBZLbxDC3efxWxz33bWH1ZgrsXrXlBl
|
stripe_publishableKe=vg_ropj_57Iiv6MFCBFq3C2n6kNJnZByV6nuDtXe9IjEPOfhmpDtWmt3MLR0gQpiHcQmAFMUPrZc3QiCDjxBZLbxDC3efxWxz33bWH1ZgrsXrXlBl
|
||||||
llamaKey=RR-EuyoFDUvfRDBj46fZKAtKJ3voM8Mt768cPeJV7GNdAkPTKdY8Odm9n4ggGqI5GyoXrXlBl
|
llamaKey=RR-EuyoFDUvfRDBj46fZKAtKJ3voM8Mt768cPeJV7GNdAkPTKdY8Odm9n4ggGqI5GyoXrXlBl
|
||||||
serverPHP=https://ride.mobile-app.store
|
serverPHP=https://ride.mobile-app.store
|
||||||
@@ -23,5 +23,3 @@ geminiApi=QOmqZsQYm08vOqjI7klVJfvP4WBFEoemjgy396iXrXlBl
|
|||||||
geminiApiMasa=QOmqZsQIdM4BRsKmaDJOP7dZp5-c6NWfch7PAlQXrXlBl
|
geminiApiMasa=QOmqZsQIdM4BRsKmaDJOP7dZp5-c6NWfch7PAlQXrXlBl
|
||||||
agoraAppId=71880f2j636509j24y5294480y30u848XrXlBl
|
agoraAppId=71880f2j636509j24y5294480y30u848XrXlBl
|
||||||
agoraAppCertificate=j17q944u49390q758u1649448q2y6xfuXrXlBl
|
agoraAppCertificate=j17q944u49390q758u1649448q2y6xfuXrXlBl
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -348,6 +348,8 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
return Get.defaultDialog(
|
return Get.defaultDialog(
|
||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
title: 'message From passenger'.tr,
|
title: 'message From passenger'.tr,
|
||||||
|
titleStyle: AppStyle.title,
|
||||||
|
middleTextStyle: AppStyle.title,
|
||||||
middleText: message.tr,
|
middleText: message.tr,
|
||||||
confirm: MyElevatedButton(
|
confirm: MyElevatedButton(
|
||||||
title: 'Ok'.tr,
|
title: 'Ok'.tr,
|
||||||
|
|||||||
@@ -264,6 +264,11 @@ class HomeCaptainController extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double mpg = 0;
|
||||||
|
calculateConsumptionFuel() {
|
||||||
|
mpg = fuelPrice / 12; //todo in register car add mpg in box
|
||||||
|
}
|
||||||
|
|
||||||
getCountRideToday() async {
|
getCountRideToday() async {
|
||||||
var res = await CRUD().get(
|
var res = await CRUD().get(
|
||||||
link: AppLink.getCountRide,
|
link: AppLink.getCountRide,
|
||||||
|
|||||||
@@ -535,6 +535,11 @@ class MapDriverController extends GetxController {
|
|||||||
// print(durationOfRideValue);
|
// print(durationOfRideValue);
|
||||||
int durationOfRide = int.parse(durationOfRideValue);
|
int durationOfRide = int.parse(durationOfRideValue);
|
||||||
update();
|
update();
|
||||||
|
int infinity = 40000;
|
||||||
|
if (carType == 'Comfort' || carType == 'Mashwari') {
|
||||||
|
durationOfRide = infinity;
|
||||||
|
update();
|
||||||
|
}
|
||||||
for (int i = 0; i <= durationOfRide; i++) {
|
for (int i = 0; i <= durationOfRide; i++) {
|
||||||
await Future.delayed(const Duration(seconds: 1));
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
recentDistanceToDash = Get.find<LocationController>().totalDistance;
|
recentDistanceToDash = Get.find<LocationController>().totalDistance;
|
||||||
@@ -547,7 +552,7 @@ class MapDriverController extends GetxController {
|
|||||||
? (i ~/ 60) +
|
? (i ~/ 60) +
|
||||||
(recentDistanceToDash *
|
(recentDistanceToDash *
|
||||||
Get.find<HomeCaptainController>().speedPrice)
|
Get.find<HomeCaptainController>().speedPrice)
|
||||||
: carType == 'Delivery'
|
: carType == 'Mashwari'
|
||||||
? (i ~/ 60) +
|
? (i ~/ 60) +
|
||||||
(recentDistanceToDash *
|
(recentDistanceToDash *
|
||||||
Get.find<HomeCaptainController>().deliveryPrice)
|
Get.find<HomeCaptainController>().deliveryPrice)
|
||||||
@@ -569,8 +574,8 @@ class MapDriverController extends GetxController {
|
|||||||
int seconds = remainingTimeTimerRideBegin % 60;
|
int seconds = remainingTimeTimerRideBegin % 60;
|
||||||
stringRemainingTimeRideBegin =
|
stringRemainingTimeRideBegin =
|
||||||
'$minutes:${seconds.toString().padLeft(2, '0')}';
|
'$minutes:${seconds.toString().padLeft(2, '0')}';
|
||||||
int minutes1 = (rideTimerFromBegin / 60).floor();
|
int minutes1 = (i / 60).floor();
|
||||||
int seconds1 = rideTimerFromBegin % 60;
|
int seconds1 = i % 60;
|
||||||
stringRemainingTimeRideBegin1 =
|
stringRemainingTimeRideBegin1 =
|
||||||
'$minutes1:${seconds1.toString().padLeft(2, '0')}';
|
'$minutes1:${seconds1.toString().padLeft(2, '0')}';
|
||||||
update();
|
update();
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import '../../../constant/box_name.dart';
|
|||||||
import '../../../constant/table_names.dart';
|
import '../../../constant/table_names.dart';
|
||||||
import '../../functions/crud.dart';
|
import '../../functions/crud.dart';
|
||||||
import '../../functions/location_controller.dart';
|
import '../../functions/location_controller.dart';
|
||||||
|
import 'home_captain_controller.dart';
|
||||||
|
|
||||||
class OrderRequestController extends GetxController {
|
class OrderRequestController extends GetxController {
|
||||||
double progress = 0;
|
double progress = 0;
|
||||||
@@ -24,7 +25,7 @@ class OrderRequestController extends GetxController {
|
|||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
getRefusedOrderByCaptain();
|
getRefusedOrderByCaptain();
|
||||||
|
// calculateConsumptionFuel();
|
||||||
update();
|
update();
|
||||||
super.onInit();
|
super.onInit();
|
||||||
}
|
}
|
||||||
@@ -34,6 +35,12 @@ class OrderRequestController extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double mpg = 0;
|
||||||
|
calculateConsumptionFuel() {
|
||||||
|
mpg = Get.find<HomeCaptainController>().fuelPrice /
|
||||||
|
12; //todo in register car add mpg in box
|
||||||
|
}
|
||||||
|
|
||||||
void getRefusedOrderByCaptain() async {
|
void getRefusedOrderByCaptain() async {
|
||||||
DateTime today = DateTime.now();
|
DateTime today = DateTime.now();
|
||||||
int todayDay = today.day;
|
int todayDay = today.day;
|
||||||
|
|||||||
@@ -478,11 +478,15 @@ class MyTranslation extends Translations {
|
|||||||
'Distance from Passenger to destination is ':
|
'Distance from Passenger to destination is ':
|
||||||
"المسافة من الراكب إلى الوجهة هي ",
|
"المسافة من الراكب إلى الوجهة هي ",
|
||||||
'price is': 'التكلفة',
|
'price is': 'التكلفة',
|
||||||
|
'This ride type does not allow changes to the destination or additional stops':
|
||||||
|
'ده نوع الرحلات مش بيسمح بتغيير نقطة الوصول أو الوقوف الإضافي',
|
||||||
|
'This price may be changed': 'خلي بالك السعر ممكن يتغي',
|
||||||
'No SIM card, no problem! Call your driver directly through our app. We use advanced technology to ensure your privacy.':
|
'No SIM card, no problem! Call your driver directly through our app. We use advanced technology to ensure your privacy.':
|
||||||
'حتا لو مفيش كارت SIM, متخفش! تقدر تكلم سواقك بمنتهى البساطة عن طريق التطبيق بتاعنا. احنا بنستخدم تكنولوجيا حديثة عشان نحافظ على خصوصيتك.',
|
'حتا لو مفيش كارت SIM, متخفش! تقدر تكلم سواقك بمنتهى البساطة عن طريق التطبيق بتاعنا. احنا بنستخدم تكنولوجيا حديثة عشان نحافظ على خصوصيتك.',
|
||||||
'Driver Finish Trip'
|
'This ride type allows changes, but the price may increase':
|
||||||
'distance is'
|
'ده نوع الرحلات بيسمح بالتغيير بس السعر ممكن يزيد ',
|
||||||
'Cost Of Trip IS ': "تكلفة الرحلة هي ",
|
'Cost Of Trip IS ': "تكلفة الرحلة هي ",
|
||||||
|
'message From passenger': 'رسالة من الراكب',
|
||||||
'Select one message': "اختر رسالة",
|
'Select one message': "اختر رسالة",
|
||||||
'My location is correct. You can search for me using the navigation app':
|
'My location is correct. You can search for me using the navigation app':
|
||||||
'المكان اللي أنا فيه صح، ممكن تدور عليّا من خلال تطبيق الملاحة',
|
'المكان اللي أنا فيه صح، ممكن تدور عليّا من خلال تطبيق الملاحة',
|
||||||
|
|||||||
@@ -196,64 +196,64 @@ class LoginCaptin extends StatelessWidget {
|
|||||||
displayFullTextOnTap: true,
|
displayFullTextOnTap: true,
|
||||||
stopPauseOnTap: true,
|
stopPauseOnTap: true,
|
||||||
),
|
),
|
||||||
// IconButton(
|
IconButton(
|
||||||
// onPressed: () async {
|
onPressed: () async {
|
||||||
// // String v =
|
// // String v =
|
||||||
// // await storage.read(key: BoxName.serverAPI) ?? '';
|
// // await storage.read(key: BoxName.serverAPI) ?? '';
|
||||||
// // print(v);
|
// // print(v);
|
||||||
// // sql.deleteAllData(TableName.faceDetectTimes);
|
// // sql.deleteAllData(TableName.faceDetectTimes);
|
||||||
// AC credentials = AC();
|
// AC credentials = AC();
|
||||||
// String apiKey =
|
// String apiKey =
|
||||||
// 'Qfrhx9d5YVHiy4uEuK4wiFc9kIuFFlvc5A6WVzPK';
|
// 'Qfrhx9d5YVHiy4uEuK4wiFc9kIuFFlvc5A6WVzPK';
|
||||||
// // // // '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';
|
// // // // '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';
|
||||||
// // credentials.gAK();
|
// // credentials.gAK();
|
||||||
// String? apiKeyf =
|
// String? apiKeyf =
|
||||||
// await storage.read(key: BoxName.chatGPTkey);
|
// await storage.read(key: BoxName.chatGPTkey);
|
||||||
// print(apiKeyf);
|
// print(apiKeyf);
|
||||||
// String convertedString = credentials.c(apiKey, s);
|
// String convertedString = credentials.c(apiKey, s);
|
||||||
// String convertedStrings = credentials.c(apiKey, s);
|
// String convertedStrings = credentials.c(apiKey, s);
|
||||||
// print('Converted String s: $convertedStrings');
|
// print('Converted String s: $convertedStrings');
|
||||||
// String convertedStringC =
|
// String convertedStringC =
|
||||||
// credentials.c(convertedStrings, c);
|
// credentials.c(convertedStrings, c);
|
||||||
// print('v: $v');
|
// print('v: $v');
|
||||||
// 'AAAAinYllCo:APA91bF1shTpzSsSxqbfY6c60D8zs1ZsdIsl9ix6nl7GDdjCqWPRK0G0ub5SqFdb1jDpQDvQPxGg-697MWLo0sy3oYImBwBLObyhk0GjtNzyr0PbE3hI-pOvhf8Vp1xgUgBmofbZYXkH'
|
// 'AAAAinYllCo:APA91bF1shTpzSsSxqbfY6c60D8zs1ZsdIsl9ix6nl7GDdjCqWPRK0G0ub5SqFdb1jDpQDvQPxGg-697MWLo0sy3oYImBwBLObyhk0GjtNzyr0PbE3hI-pOvhf8Vp1xgUgBmofbZYXkH'
|
||||||
// 'AAAAinYllCo:APA91bF1shTpzSsSxqbfY6c60D8zs1ZsdIsl9ix6nl7GDdjCqWPRK0G0ub5SqFdb1jDpQDvQPxGg-697MWLo0sy3oYImBwBLObyhk0GjtNzyr0PbE3hI-pOvhf8Vp1xgUgBmofbZYXkH'
|
// 'AAAAinYllCo:APA91bF1shTpzSsSxqbfY6c60D8zs1ZsdIsl9ix6nl7GDdjCqWPRK0G0ub5SqFdb1jDpQDvQPxGg-697MWLo0sy3oYImBwBLObyhk0GjtNzyr0PbE3hI-pOvhf8Vp1xgUgBmofbZYXkH'
|
||||||
// String convertedStringN = credentials.c(
|
// String convertedStringN = credentials.c(
|
||||||
// credentials.c(
|
// credentials.c(
|
||||||
// credentials.c(
|
// credentials.c(
|
||||||
// 'ASCeQiScKwmkMyjlrr7l0tT57Br2yPRAgm5xZndjnusED53JA0us1DbqJaJXDVWFCtAHapjVqA5FEEPL',
|
// 'ASCeQiScKwmkMyjlrr7l0tT57Br2yPRAgm5xZndjnusED53JA0us1DbqJaJXDVWFCtAHapjVqA5FEEPL',
|
||||||
// cs),
|
// cs),
|
||||||
// cC),
|
// cC),
|
||||||
// cn);
|
// cn);
|
||||||
// print('Converted v: $convertedStringN');
|
// print('Converted v: $convertedStringN');
|
||||||
// //
|
// //
|
||||||
// String retrievedStringN =
|
// String retrievedStringN =
|
||||||
// credentials.r(convertedStringN, n);
|
// credentials.r(convertedStringN, n);
|
||||||
// print('Retrieved String: $retrievedStringN');
|
// print('Retrieved String: $retrievedStringN');
|
||||||
// String retrievedStringC =
|
// String retrievedStringC =
|
||||||
// credentials.r(retrievedStringN, c);
|
// credentials.r(retrievedStringN, c);
|
||||||
// print('Retrieved String: $retrievedStringC');
|
// print('Retrieved String: $retrievedStringC');
|
||||||
|
|
||||||
// String retrievedStringS = credentials.r(
|
// String retrievedStringS = credentials.r(
|
||||||
// credentials.r(
|
// credentials.r(
|
||||||
// credentials.r(convertedStringN, cn), cC),
|
// credentials.r(convertedStringN, cn), cC),
|
||||||
// cs);
|
// cs);
|
||||||
// print('Retrieved String: $retrievedStringS');
|
// print('Retrieved String: $retrievedStringS');
|
||||||
//
|
//
|
||||||
// if (retrievedStringS == apiKey) {
|
// if (retrievedStringS == apiKey) {
|
||||||
// print('same');
|
// print('same');
|
||||||
// }
|
// }
|
||||||
// print(' AK is ' + AK.chatGPTkey); //
|
// print(' AK is ' + AK.chatGPTkey); //
|
||||||
//
|
//
|
||||||
// print(' ENV is ' + Env.chatGPTkey); //
|
// print(' ENV is ' + Env.chatGPTkey); //
|
||||||
// // print('storage is ' + v); //
|
// // print('storage is ' + v); //
|
||||||
// print('storage is ' + apiKeyf!); //
|
// print('storage is ' + apiKeyf!); //
|
||||||
// },
|
},
|
||||||
// icon: const Icon(
|
icon: const Icon(
|
||||||
// Icons.close,
|
Icons.close,
|
||||||
// color: AppColor.blueColor,
|
color: AppColor.blueColor,
|
||||||
// ),
|
),
|
||||||
// ),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -21,42 +21,46 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
|||||||
decoration: AppStyle.boxDecoration1,
|
decoration: AppStyle.boxDecoration1,
|
||||||
height: mapDriverController.remainingTimeTimerRideBegin < 60
|
height: mapDriverController.remainingTimeTimerRideBegin < 60
|
||||||
? mapDriverController.driverEndPage = 190
|
? mapDriverController.driverEndPage = 190
|
||||||
: 170,
|
: mapDriverController.carType == 'Mashwari'
|
||||||
|
? 150
|
||||||
|
: 170,
|
||||||
// width: 240,
|
// width: 240,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
mapDriverController.carType != 'Mashwari'
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
? Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
Column(
|
children: [
|
||||||
children: [
|
Column(
|
||||||
const Icon(Icons.social_distance),
|
children: [
|
||||||
Text(
|
const Icon(Icons.social_distance),
|
||||||
'${mapDriverController.distance} ${'KM'.tr}',
|
Text(
|
||||||
style: AppStyle.title,
|
'${mapDriverController.distance} ${'KM'.tr}',
|
||||||
),
|
style: AppStyle.title,
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
Column(
|
),
|
||||||
children: [
|
Column(
|
||||||
const Icon(Icons.timelapse),
|
children: [
|
||||||
Text(
|
const Icon(Icons.timelapse),
|
||||||
mapDriverController.hours > 1
|
Text(
|
||||||
? '${'${'Your Ride Duration is '.tr}${mapDriverController.hours}${' H and'.tr}'} ${mapDriverController.minutes} m'
|
mapDriverController.hours > 1
|
||||||
: '${'Your Ride Duration is '.tr} ${mapDriverController.minutes} ${'m'.tr}',
|
? '${'${'Your Ride Duration is '.tr}${mapDriverController.hours}${' H and'.tr}'} ${mapDriverController.minutes} m'
|
||||||
style: AppStyle.title),
|
: '${'Your Ride Duration is '.tr} ${mapDriverController.minutes} ${'m'.tr}',
|
||||||
],
|
style: AppStyle.title),
|
||||||
),
|
],
|
||||||
Column(
|
),
|
||||||
children: [
|
Column(
|
||||||
const Icon(Icons.money_sharp),
|
children: [
|
||||||
Text(
|
const Icon(Icons.money_sharp),
|
||||||
'${mapDriverController.paymentAmount} ${'\$'.tr}',
|
Text(
|
||||||
style: AppStyle.title),
|
'${mapDriverController.paymentAmount} ${'\$'.tr}',
|
||||||
],
|
style: AppStyle.title),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
|
)
|
||||||
|
: const SizedBox(),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
@@ -99,28 +103,40 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
Stack(
|
mapDriverController.carType != 'Comfort' ||
|
||||||
children: [
|
mapDriverController.carType != 'Mashwari'
|
||||||
LinearProgressIndicator(
|
? Stack(
|
||||||
backgroundColor: AppColor.accentColor,
|
children: [
|
||||||
color:
|
LinearProgressIndicator(
|
||||||
mapDriverController.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.progressTimerRideBegin
|
minHeight: 25,
|
||||||
.toDouble(),
|
borderRadius: BorderRadius.circular(15),
|
||||||
),
|
value: mapDriverController
|
||||||
Center(
|
.progressTimerRideBegin
|
||||||
child: Text(
|
.toDouble(),
|
||||||
mapDriverController.stringRemainingTimeRideBegin,
|
),
|
||||||
style: AppStyle.title,
|
Center(
|
||||||
),
|
child: Text(
|
||||||
)
|
mapDriverController
|
||||||
],
|
.stringRemainingTimeRideBegin,
|
||||||
),
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: const SizedBox(),
|
||||||
|
Container(
|
||||||
|
decoration: AppStyle.boxDecoration1,
|
||||||
|
child: Text(
|
||||||
|
mapDriverController.carType,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:SEFER/constant/box_name.dart';
|
import 'package:SEFER/constant/box_name.dart';
|
||||||
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
||||||
@@ -63,6 +62,7 @@ class OrderRequestPage extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
// void addCustomStartIcon() async {
|
// void addCustomStartIcon() async {
|
||||||
// Create the marker with the resized image
|
// Create the marker with the resized image
|
||||||
|
orderRequestController.calculateConsumptionFuel();
|
||||||
|
|
||||||
ImageConfiguration config = ImageConfiguration(
|
ImageConfiguration config = ImageConfiguration(
|
||||||
size: const Size(25, 25), devicePixelRatio: Get.pixelRatio);
|
size: const Size(25, 25), devicePixelRatio: Get.pixelRatio);
|
||||||
@@ -79,13 +79,8 @@ class OrderRequestPage extends StatelessWidget {
|
|||||||
endIcon = value;
|
endIcon = value;
|
||||||
});
|
});
|
||||||
// }
|
// }
|
||||||
double mpg = 0;
|
// orderRequestController.calculateConsumptionFuel();
|
||||||
calculateConsumptionFuel() {
|
|
||||||
mpg = Get.find<HomeCaptainController>().fuelPrice /
|
|
||||||
12; //todo in register car add mpg in box
|
|
||||||
}
|
|
||||||
|
|
||||||
calculateConsumptionFuel();
|
|
||||||
return MyScafolld(
|
return MyScafolld(
|
||||||
title: 'Order Details'.tr,
|
title: 'Order Details'.tr,
|
||||||
body: [
|
body: [
|
||||||
@@ -284,11 +279,8 @@ class OrderRequestPage extends StatelessWidget {
|
|||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: ((Get.find<HomeCaptainController>()
|
text:
|
||||||
.fuelPrice /
|
orderRequestController.mpg.toStringAsFixed(0),
|
||||||
12) *
|
|
||||||
double.parse(myList[5]))
|
|
||||||
.toStringAsFixed(2),
|
|
||||||
style: AppStyle.headTitle2),
|
style: AppStyle.headTitle2),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ class OrderSpeedRequest extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
// void addCustomStartIcon() async {
|
// void addCustomStartIcon() async {
|
||||||
// Create the marker with the resized image
|
// Create the marker with the resized image
|
||||||
|
orderRequestController.calculateConsumptionFuel();
|
||||||
|
|
||||||
ImageConfiguration config = ImageConfiguration(
|
ImageConfiguration config = ImageConfiguration(
|
||||||
size: const Size(25, 25), devicePixelRatio: Get.pixelRatio);
|
size: const Size(25, 25), devicePixelRatio: Get.pixelRatio);
|
||||||
@@ -292,11 +293,7 @@ class OrderSpeedRequest extends StatelessWidget {
|
|||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text: orderRequestController.mpg.toStringAsFixed(0),
|
||||||
((Get.find<HomeCaptainController>().fuelPrice /
|
|
||||||
12) *
|
|
||||||
double.parse(myList[5]))
|
|
||||||
.toStringAsFixed(2),
|
|
||||||
style: AppStyle.headTitle2),
|
style: AppStyle.headTitle2),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -26,31 +26,56 @@ class ApplyOrderWidget extends StatelessWidget {
|
|||||||
right: 0,
|
right: 0,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: AppStyle.boxDecoration1,
|
decoration: AppStyle.boxDecoration1,
|
||||||
height: Get.height * .2,
|
height: Get.height * .3,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
children: [
|
children: [
|
||||||
Text.rich(
|
InkWell(
|
||||||
TextSpan(
|
onTap: () {
|
||||||
children: [
|
if (box.read(BoxName.carType) == 'Speed' ||
|
||||||
TextSpan(
|
box.read(BoxName.carType) == 'Delivery') {
|
||||||
text: '${'The driver accept your order for'.tr} ',
|
Get.snackbar(
|
||||||
style: AppStyle.title,
|
'This price is ${controller.totalPassenger.toStringAsFixed(2)}'
|
||||||
),
|
.tr,
|
||||||
TextSpan(
|
'This ride type does not allow changes to the destination or additional stops'
|
||||||
text: controller.totalPassenger.toStringAsFixed(2),
|
.tr,
|
||||||
style: AppStyle.title.copyWith(
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
fontWeight: FontWeight.bold,
|
duration: const Duration(seconds: 2),
|
||||||
// fontSize: 22,
|
backgroundColor: AppColor.yellowColor,
|
||||||
color: AppColor.redColor,
|
);
|
||||||
|
} else {
|
||||||
|
Get.snackbar(
|
||||||
|
'This price may be changed'.tr,
|
||||||
|
'This ride type allows changes, but the price may increase'
|
||||||
|
.tr,
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
duration: const Duration(seconds: 2),
|
||||||
|
backgroundColor: AppColor.yellowColor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Text.rich(
|
||||||
|
TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: '${'The driver accept your order for'.tr} ',
|
||||||
|
style: AppStyle.title,
|
||||||
),
|
),
|
||||||
),
|
TextSpan(
|
||||||
TextSpan(
|
text: controller.totalPassenger.toStringAsFixed(2),
|
||||||
text: ' ${'LE'.tr}',
|
style: AppStyle.title.copyWith(
|
||||||
style: AppStyle.title,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
// fontSize: 22,
|
||||||
],
|
color: AppColor.redColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: ' ${'LE'.tr}',
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@@ -154,11 +179,15 @@ class ApplyOrderWidget extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.all(4),
|
const EdgeInsets.all(10),
|
||||||
child: Text(
|
child: Container(
|
||||||
'Hello, I\'m at the agreed-upon location'
|
decoration:
|
||||||
.tr,
|
AppStyle.boxDecoration1,
|
||||||
style: AppStyle.title,
|
child: Text(
|
||||||
|
'Hello, I\'m at the agreed-upon location'
|
||||||
|
.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -174,11 +203,15 @@ class ApplyOrderWidget extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.all(4),
|
const EdgeInsets.all(10),
|
||||||
child: Text(
|
child: Container(
|
||||||
'My location is correct. You can search for me using the navigation app'
|
decoration:
|
||||||
.tr,
|
AppStyle.boxDecoration1,
|
||||||
style: AppStyle.title,
|
child: Text(
|
||||||
|
'My location is correct. You can search for me using the navigation app'
|
||||||
|
.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -194,10 +227,14 @@ class ApplyOrderWidget extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.all(4),
|
const EdgeInsets.all(10),
|
||||||
child: Text(
|
child: Container(
|
||||||
'I\'m waiting for you'.tr,
|
decoration:
|
||||||
style: AppStyle.title,
|
AppStyle.boxDecoration1,
|
||||||
|
child: Text(
|
||||||
|
'I\'m waiting for you'.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ class CashConfirmPageShown extends StatelessWidget {
|
|||||||
title: 'Next'.tr,
|
title: 'Next'.tr,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
controller.changeCashConfirmPageShown();
|
controller.changeCashConfirmPageShown();
|
||||||
|
controller.isSearchingWindow = true;
|
||||||
controller.confirmRideForFirstDriver();
|
controller.confirmRideForFirstDriver();
|
||||||
controller.update();
|
controller.update();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class RideBeginPassenger extends StatelessWidget {
|
|||||||
AudioController audioController = Get.put(AudioController());
|
AudioController audioController = Get.put(AudioController());
|
||||||
return GetBuilder<MapPassengerController>(builder: (controller) {
|
return GetBuilder<MapPassengerController>(builder: (controller) {
|
||||||
if ( //controller.rideTimerBegin ||
|
if ( //controller.rideTimerBegin ||
|
||||||
controller.statusRide == 'Begin' && !controller.statusRideFromStart) {
|
controller.statusRide == 'Begin' || !controller.statusRideFromStart) {
|
||||||
return Positioned(
|
return Positioned(
|
||||||
left: 10,
|
left: 10,
|
||||||
right: 10,
|
right: 10,
|
||||||
|
|||||||
Reference in New Issue
Block a user