4/10/5
This commit is contained in:
@@ -196,64 +196,64 @@ class LoginCaptin extends StatelessWidget {
|
||||
displayFullTextOnTap: true,
|
||||
stopPauseOnTap: true,
|
||||
),
|
||||
// IconButton(
|
||||
// onPressed: () async {
|
||||
// // String v =
|
||||
// // await storage.read(key: BoxName.serverAPI) ?? '';
|
||||
// // print(v);
|
||||
// // sql.deleteAllData(TableName.faceDetectTimes);
|
||||
// AC credentials = AC();
|
||||
// String apiKey =
|
||||
// 'Qfrhx9d5YVHiy4uEuK4wiFc9kIuFFlvc5A6WVzPK';
|
||||
// // // // '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';
|
||||
// // credentials.gAK();
|
||||
// String? apiKeyf =
|
||||
// await storage.read(key: BoxName.chatGPTkey);
|
||||
// print(apiKeyf);
|
||||
// String convertedString = credentials.c(apiKey, s);
|
||||
// String convertedStrings = credentials.c(apiKey, s);
|
||||
// print('Converted String s: $convertedStrings');
|
||||
// String convertedStringC =
|
||||
// credentials.c(convertedStrings, c);
|
||||
// print('v: $v');
|
||||
// 'AAAAinYllCo:APA91bF1shTpzSsSxqbfY6c60D8zs1ZsdIsl9ix6nl7GDdjCqWPRK0G0ub5SqFdb1jDpQDvQPxGg-697MWLo0sy3oYImBwBLObyhk0GjtNzyr0PbE3hI-pOvhf8Vp1xgUgBmofbZYXkH'
|
||||
// 'AAAAinYllCo:APA91bF1shTpzSsSxqbfY6c60D8zs1ZsdIsl9ix6nl7GDdjCqWPRK0G0ub5SqFdb1jDpQDvQPxGg-697MWLo0sy3oYImBwBLObyhk0GjtNzyr0PbE3hI-pOvhf8Vp1xgUgBmofbZYXkH'
|
||||
// String convertedStringN = credentials.c(
|
||||
// credentials.c(
|
||||
// credentials.c(
|
||||
// 'ASCeQiScKwmkMyjlrr7l0tT57Br2yPRAgm5xZndjnusED53JA0us1DbqJaJXDVWFCtAHapjVqA5FEEPL',
|
||||
// cs),
|
||||
// cC),
|
||||
// cn);
|
||||
// print('Converted v: $convertedStringN');
|
||||
// //
|
||||
// String retrievedStringN =
|
||||
// credentials.r(convertedStringN, n);
|
||||
// print('Retrieved String: $retrievedStringN');
|
||||
// String retrievedStringC =
|
||||
// credentials.r(retrievedStringN, c);
|
||||
// print('Retrieved String: $retrievedStringC');
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
// // String v =
|
||||
// // await storage.read(key: BoxName.serverAPI) ?? '';
|
||||
// // print(v);
|
||||
// // sql.deleteAllData(TableName.faceDetectTimes);
|
||||
// AC credentials = AC();
|
||||
// String apiKey =
|
||||
// 'Qfrhx9d5YVHiy4uEuK4wiFc9kIuFFlvc5A6WVzPK';
|
||||
// // // // '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';
|
||||
// // credentials.gAK();
|
||||
// String? apiKeyf =
|
||||
// await storage.read(key: BoxName.chatGPTkey);
|
||||
// print(apiKeyf);
|
||||
// String convertedString = credentials.c(apiKey, s);
|
||||
// String convertedStrings = credentials.c(apiKey, s);
|
||||
// print('Converted String s: $convertedStrings');
|
||||
// String convertedStringC =
|
||||
// credentials.c(convertedStrings, c);
|
||||
// print('v: $v');
|
||||
// 'AAAAinYllCo:APA91bF1shTpzSsSxqbfY6c60D8zs1ZsdIsl9ix6nl7GDdjCqWPRK0G0ub5SqFdb1jDpQDvQPxGg-697MWLo0sy3oYImBwBLObyhk0GjtNzyr0PbE3hI-pOvhf8Vp1xgUgBmofbZYXkH'
|
||||
// 'AAAAinYllCo:APA91bF1shTpzSsSxqbfY6c60D8zs1ZsdIsl9ix6nl7GDdjCqWPRK0G0ub5SqFdb1jDpQDvQPxGg-697MWLo0sy3oYImBwBLObyhk0GjtNzyr0PbE3hI-pOvhf8Vp1xgUgBmofbZYXkH'
|
||||
// String convertedStringN = credentials.c(
|
||||
// credentials.c(
|
||||
// credentials.c(
|
||||
// 'ASCeQiScKwmkMyjlrr7l0tT57Br2yPRAgm5xZndjnusED53JA0us1DbqJaJXDVWFCtAHapjVqA5FEEPL',
|
||||
// cs),
|
||||
// cC),
|
||||
// cn);
|
||||
// print('Converted v: $convertedStringN');
|
||||
// //
|
||||
// String retrievedStringN =
|
||||
// credentials.r(convertedStringN, n);
|
||||
// print('Retrieved String: $retrievedStringN');
|
||||
// String retrievedStringC =
|
||||
// credentials.r(retrievedStringN, c);
|
||||
// print('Retrieved String: $retrievedStringC');
|
||||
|
||||
// String retrievedStringS = credentials.r(
|
||||
// credentials.r(
|
||||
// credentials.r(convertedStringN, cn), cC),
|
||||
// cs);
|
||||
// print('Retrieved String: $retrievedStringS');
|
||||
//
|
||||
// if (retrievedStringS == apiKey) {
|
||||
// print('same');
|
||||
// }
|
||||
// print(' AK is ' + AK.chatGPTkey); //
|
||||
//
|
||||
// print(' ENV is ' + Env.chatGPTkey); //
|
||||
// // print('storage is ' + v); //
|
||||
// print('storage is ' + apiKeyf!); //
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// Icons.close,
|
||||
// color: AppColor.blueColor,
|
||||
// ),
|
||||
// ),
|
||||
// String retrievedStringS = credentials.r(
|
||||
// credentials.r(
|
||||
// credentials.r(convertedStringN, cn), cC),
|
||||
// cs);
|
||||
// print('Retrieved String: $retrievedStringS');
|
||||
//
|
||||
// if (retrievedStringS == apiKey) {
|
||||
// print('same');
|
||||
// }
|
||||
// print(' AK is ' + AK.chatGPTkey); //
|
||||
//
|
||||
// print(' ENV is ' + Env.chatGPTkey); //
|
||||
// // print('storage is ' + v); //
|
||||
// print('storage is ' + apiKeyf!); //
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.close,
|
||||
color: AppColor.blueColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -21,42 +21,46 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
height: mapDriverController.remainingTimeTimerRideBegin < 60
|
||||
? mapDriverController.driverEndPage = 190
|
||||
: 170,
|
||||
: mapDriverController.carType == 'Mashwari'
|
||||
? 150
|
||||
: 170,
|
||||
// width: 240,
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
const Icon(Icons.social_distance),
|
||||
Text(
|
||||
'${mapDriverController.distance} ${'KM'.tr}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
const Icon(Icons.timelapse),
|
||||
Text(
|
||||
mapDriverController.hours > 1
|
||||
? '${'${'Your Ride Duration is '.tr}${mapDriverController.hours}${' H and'.tr}'} ${mapDriverController.minutes} m'
|
||||
: '${'Your Ride Duration is '.tr} ${mapDriverController.minutes} ${'m'.tr}',
|
||||
style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
const Icon(Icons.money_sharp),
|
||||
Text(
|
||||
'${mapDriverController.paymentAmount} ${'\$'.tr}',
|
||||
style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
mapDriverController.carType != 'Mashwari'
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
const Icon(Icons.social_distance),
|
||||
Text(
|
||||
'${mapDriverController.distance} ${'KM'.tr}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
const Icon(Icons.timelapse),
|
||||
Text(
|
||||
mapDriverController.hours > 1
|
||||
? '${'${'Your Ride Duration is '.tr}${mapDriverController.hours}${' H and'.tr}'} ${mapDriverController.minutes} m'
|
||||
: '${'Your Ride Duration is '.tr} ${mapDriverController.minutes} ${'m'.tr}',
|
||||
style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
const Icon(Icons.money_sharp),
|
||||
Text(
|
||||
'${mapDriverController.paymentAmount} ${'\$'.tr}',
|
||||
style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
@@ -99,28 +103,40 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
Stack(
|
||||
children: [
|
||||
LinearProgressIndicator(
|
||||
backgroundColor: AppColor.accentColor,
|
||||
color:
|
||||
mapDriverController.remainingTimeTimerRideBegin <
|
||||
60
|
||||
? AppColor.redColor
|
||||
: AppColor.greenColor,
|
||||
minHeight: 25,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
value: mapDriverController.progressTimerRideBegin
|
||||
.toDouble(),
|
||||
),
|
||||
Center(
|
||||
child: Text(
|
||||
mapDriverController.stringRemainingTimeRideBegin,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
mapDriverController.carType != 'Comfort' ||
|
||||
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(),
|
||||
),
|
||||
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:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
||||
@@ -63,6 +62,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
);
|
||||
// void addCustomStartIcon() async {
|
||||
// Create the marker with the resized image
|
||||
orderRequestController.calculateConsumptionFuel();
|
||||
|
||||
ImageConfiguration config = ImageConfiguration(
|
||||
size: const Size(25, 25), devicePixelRatio: Get.pixelRatio);
|
||||
@@ -79,13 +79,8 @@ class OrderRequestPage extends StatelessWidget {
|
||||
endIcon = value;
|
||||
});
|
||||
// }
|
||||
double mpg = 0;
|
||||
calculateConsumptionFuel() {
|
||||
mpg = Get.find<HomeCaptainController>().fuelPrice /
|
||||
12; //todo in register car add mpg in box
|
||||
}
|
||||
// orderRequestController.calculateConsumptionFuel();
|
||||
|
||||
calculateConsumptionFuel();
|
||||
return MyScafolld(
|
||||
title: 'Order Details'.tr,
|
||||
body: [
|
||||
@@ -284,11 +279,8 @@ class OrderRequestPage extends StatelessWidget {
|
||||
style: AppStyle.title,
|
||||
children: [
|
||||
TextSpan(
|
||||
text: ((Get.find<HomeCaptainController>()
|
||||
.fuelPrice /
|
||||
12) *
|
||||
double.parse(myList[5]))
|
||||
.toStringAsFixed(2),
|
||||
text:
|
||||
orderRequestController.mpg.toStringAsFixed(0),
|
||||
style: AppStyle.headTitle2),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -65,6 +65,7 @@ class OrderSpeedRequest extends StatelessWidget {
|
||||
);
|
||||
// void addCustomStartIcon() async {
|
||||
// Create the marker with the resized image
|
||||
orderRequestController.calculateConsumptionFuel();
|
||||
|
||||
ImageConfiguration config = ImageConfiguration(
|
||||
size: const Size(25, 25), devicePixelRatio: Get.pixelRatio);
|
||||
@@ -292,11 +293,7 @@ class OrderSpeedRequest extends StatelessWidget {
|
||||
style: AppStyle.title,
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
((Get.find<HomeCaptainController>().fuelPrice /
|
||||
12) *
|
||||
double.parse(myList[5]))
|
||||
.toStringAsFixed(2),
|
||||
text: orderRequestController.mpg.toStringAsFixed(0),
|
||||
style: AppStyle.headTitle2),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -26,31 +26,56 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
right: 0,
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
height: Get.height * .2,
|
||||
height: Get.height * .3,
|
||||
child: ListView(
|
||||
children: [
|
||||
Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '${'The driver accept your order for'.tr} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
TextSpan(
|
||||
text: controller.totalPassenger.toStringAsFixed(2),
|
||||
style: AppStyle.title.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
// fontSize: 22,
|
||||
color: AppColor.redColor,
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (box.read(BoxName.carType) == 'Speed' ||
|
||||
box.read(BoxName.carType) == 'Delivery') {
|
||||
Get.snackbar(
|
||||
'This price is ${controller.totalPassenger.toStringAsFixed(2)}'
|
||||
.tr,
|
||||
'This ride type does not allow changes to the destination or additional stops'
|
||||
.tr,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
duration: const Duration(seconds: 2),
|
||||
backgroundColor: AppColor.yellowColor,
|
||||
);
|
||||
} 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(
|
||||
text: ' ${'LE'.tr}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
TextSpan(
|
||||
text: controller.totalPassenger.toStringAsFixed(2),
|
||||
style: AppStyle.title.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
// fontSize: 22,
|
||||
color: AppColor.redColor,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: ' ${'LE'.tr}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -154,11 +179,15 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
},
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.all(4),
|
||||
child: Text(
|
||||
'Hello, I\'m at the agreed-upon location'
|
||||
.tr,
|
||||
style: AppStyle.title,
|
||||
const EdgeInsets.all(10),
|
||||
child: Container(
|
||||
decoration:
|
||||
AppStyle.boxDecoration1,
|
||||
child: Text(
|
||||
'Hello, I\'m at the agreed-upon location'
|
||||
.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -174,11 +203,15 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
},
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.all(4),
|
||||
child: Text(
|
||||
'My location is correct. You can search for me using the navigation app'
|
||||
.tr,
|
||||
style: AppStyle.title,
|
||||
const EdgeInsets.all(10),
|
||||
child: Container(
|
||||
decoration:
|
||||
AppStyle.boxDecoration1,
|
||||
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(
|
||||
padding:
|
||||
const EdgeInsets.all(4),
|
||||
child: Text(
|
||||
'I\'m waiting for you'.tr,
|
||||
style: AppStyle.title,
|
||||
const EdgeInsets.all(10),
|
||||
child: Container(
|
||||
decoration:
|
||||
AppStyle.boxDecoration1,
|
||||
child: Text(
|
||||
'I\'m waiting for you'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -176,6 +176,7 @@ class CashConfirmPageShown extends StatelessWidget {
|
||||
title: 'Next'.tr,
|
||||
onPressed: () {
|
||||
controller.changeCashConfirmPageShown();
|
||||
controller.isSearchingWindow = true;
|
||||
controller.confirmRideForFirstDriver();
|
||||
controller.update();
|
||||
},
|
||||
|
||||
@@ -22,7 +22,7 @@ class RideBeginPassenger extends StatelessWidget {
|
||||
AudioController audioController = Get.put(AudioController());
|
||||
return GetBuilder<MapPassengerController>(builder: (controller) {
|
||||
if ( //controller.rideTimerBegin ||
|
||||
controller.statusRide == 'Begin' && !controller.statusRideFromStart) {
|
||||
controller.statusRide == 'Begin' || !controller.statusRideFromStart) {
|
||||
return Positioned(
|
||||
left: 10,
|
||||
right: 10,
|
||||
|
||||
Reference in New Issue
Block a user