4/6/2
This commit is contained in:
25
.env
25
.env
@@ -8,15 +8,20 @@ chatGPTkey=zg-4C26q4SYBKQeHZDqkWowC9XrxgUEfUy9JRw2rm6Q2adb3kjwXrXlBl
|
||||
transactionCloude=Qhcwilomqcoib:QVO_JNYED2XWA26YXKC2TP:YK1DVH6SJB31N3PE1UXrXlBl
|
||||
visionApi=3pALsqSSYTvzp69Q5FMIgbzjG6Z1zktJXrXlBl
|
||||
chatGPTkeySefer=zg-IiR34ooza3Yvhvb9rZk1C9XrxgUE0l8jRRZrHj3Qe5QXPlqVXrXlBl
|
||||
chatGPTkeySeferNew=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
|
||||
secretKey=zg_cjzc_57I0TCIYNJPlIFQ5ZXkqiZZ28bBULsuMd1Cr5IYztSseaRvf3LdXWT9wwfV94Cv64CM7VAiMi6jWUrrLoAy9lNWVB33Rl8TY9b1XrXlBl
|
||||
stripe_publishableKe=vg_cjzc_57I0TCIYNJPlIFQ5ZB5j2x4vQpU5FVYF9f9Vou74a60BJAQvH5QunMMJB8D1TOqsuOlHCeeh7vHqpnkijRkx9UL5g33vb0iNWKIXrXlBl
|
||||
llamaKey=LL-JfdiCXFpcLXNe87cSGQwGE0piZ9Zw179tVjEP1KMxQgVWGxD9Ixz3m8kkKaO5Kdi
|
||||
chatGPTkeySeferNew=zg-Z4AJcAROgNXjgrEIU8fKC9XrxgUE4Qtrrlq1yiux0jL3dITSXrXlBl
|
||||
secretKey=mk_femf_56O3CFOSBEVrOUA5MDgaoMM14xXHRzhNy7Fl5OSmcZzjqLpu9RyDTC8ttuP80Fp20FN6PQoNo2eTHllRiQs8rBTPX99Lr4CS8x7DlDrXrXrXlBl
|
||||
stripe_publishableKe=vg_ropj_57Iiv6MFCBFq3C2n6kNJnZByV6nuDtXe9IjEPOfhmpDtWmt3MLR0gQpiHcQmAFMUPrZc3QiCDjxBZLbxDC3efxWxz33bWH1ZgrsXrXlBl
|
||||
llamaKey=RR-EuyoFDUvfRDBj46fZKAtKJ3voM8Mt768cPeJV7GNdAkPTKdY8Odm9n4ggGqI5GyoXrXlBl
|
||||
serverPHP=https://ride.mobile-app.store
|
||||
cohere=Qfrhx9d5YVHiy4uEuK4wiFc9kIuFFlvc5A6WVzPK
|
||||
claudeAiAPI=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
|
||||
payPalClientId=AWj9MdPaA5Djpx8gOkvBn2qhP-3KvfB6W-l8USTsm19Xi2NhkNkE9QzosOvTPTsKjCMNffgpqStUA1-x
|
||||
payPalSecret=EKkasSl9O61lrfrbaJfXp1B-CIs2Rv71J0WPouxxugi38DsWaMhWpovJxN2ftYPQ0l6v9eoBvnyWkemp
|
||||
geminiApi=AIzaSyADz49pIaeO1grPEcpV8HNCJijzekd037o
|
||||
geminiApiMasa=AIzaSyAOxZ8NLyGzqXEIV1xSv5-t7MHctu1VQrA
|
||||
cohere=Aulwd8y5SPWos0hJhG0toUf8gOhUUrpf5Q2TPmVGXrXlBl
|
||||
claudeAiAPI=zg-qbc-qvo39-xWOxIGwWTOzCFBnIYSKKhfyz_KVAvrH-6_4ZEJL68G_QBH26oeTOMMoQug9KuOjjKSP_A4S3SUDlbxR9duVzoQ-MkX_UQQQXrXlBl
|
||||
payPalClientId=QALymfNI5Tzt4s-ysoz6vD4_nqX0SUtkC_qYV-Ugk5gaM_8Z-kg4L53k8Uux_4jEWXDkNpXGSWPpIzDFXrXlBl
|
||||
payPalClientIdLive=QZFjAoZfGtngNserll6r3cC56Xl1sVLQkn5dMbyebhzJY59EQ3hz7YxaEqEDYPTUFcQWqvePaQ5UJJVRXrXlBl
|
||||
payPalSecret=JBAAvqJQGUsKD0Zjh4KjeczxfBFx-38SdlbIS56VRM8NDfe6mjMeZJhNLJek5XgQCqKCHtRf6MjRy-f8XrXlBl
|
||||
payPalSecretLive=JQDATqnDfiFpEAN60KB4pGpDaJjyqBAd9jxMBPpzWU1P1k3H1jZhQjn73EHsKQna74P8p98hgOnMaWPWXrXlBl
|
||||
geminiApi=QOmqZsQYm08vOqjI7klVJfvP4WBFEoemjgy396iXrXlBl
|
||||
geminiApiMasa=QOmqZsQIdM4BRsKmaDJOP7dZp5-c6NWfch7PAlQXrXlBl
|
||||
agoraAppId=71880f2j636509j24y5294480y30u848XrXlBl
|
||||
agoraAppCertificate=j17q944u49390q758u1649448q2y6xfuXrXlBl
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,5 @@ class AK {
|
||||
static final String payPalSecret = Env.payPalSecret;
|
||||
static final String geminiApi = Env.geminiApi;
|
||||
static const String agoraAppId = '12994c6e707543e68d5638894d04f989';
|
||||
static const String agoraChannelName = 'sefer1';
|
||||
static const String agoraToken =
|
||||
'007eJxTYAjpCZ9yKVn8k5S5blKObpxhXtrE5vXtO0+cEjrxUnR3cZ8Cg6GRpaVJslmquYG5qYlxqplFiqmZsYWFpUmKgUmapYVlVeGF1IZARoZFOjkMjFAI4rMxFKempRYZMjAAABlgHmg=';
|
||||
static const String agoraAppCertificate = 'e21a388f83034a159f2783889a6d7bcf';
|
||||
}
|
||||
|
||||
@@ -49,8 +49,10 @@ class CRUD {
|
||||
required String uid,
|
||||
}) async {
|
||||
var uid = box.read(BoxName.phone) ?? box.read(BoxName.phoneDriver);
|
||||
var res = await http.get(Uri.parse(
|
||||
'https://repulsive-pig-rugby-shirt.cyclic.app/token?channelName=$channelName'));
|
||||
var res = await http.get(
|
||||
Uri.parse(
|
||||
'https://repulsive-pig-rugby-shirt.cyclic.app/token?channelName=$channelName'),
|
||||
headers: {'Authorization': 'Bearer ${AK.agoraAppCertificate}'});
|
||||
|
||||
if (res.statusCode == 200) {
|
||||
var response = jsonDecode(res.body);
|
||||
|
||||
@@ -32,7 +32,7 @@ class HomeCaptainController extends GetxController {
|
||||
double naturePrice = 0;
|
||||
bool isCallOn = false;
|
||||
String totalMoneyToday = '0';
|
||||
String rating = '0';
|
||||
double? rating = 5;
|
||||
String rideId = '0';
|
||||
String countRideToday = '0';
|
||||
String totalMoneyInSEFER = '0';
|
||||
@@ -274,11 +274,16 @@ class HomeCaptainController extends GetxController {
|
||||
var res = await CRUD().get(
|
||||
link: AppLink.getDriverRate,
|
||||
payload: {'driver_id': box.read(BoxName.driverID).toString()});
|
||||
var decod = jsonDecode(res);
|
||||
// print(decod);
|
||||
rating = decod['message'][0]['rating'].toString();
|
||||
// print('rating $rating');
|
||||
update();
|
||||
if (res != 'failure') {
|
||||
var decod = jsonDecode(res);
|
||||
if (decod['message'][0]['rating'] != null) {
|
||||
rating = double.parse(decod['message'][0]['rating'].toString());
|
||||
} else {
|
||||
rating = 5.0; // Set a default value (e.g., 5.0 for full rating)
|
||||
}
|
||||
} else {
|
||||
rating = 5;
|
||||
}
|
||||
}
|
||||
|
||||
getAllPayment() async {
|
||||
|
||||
@@ -582,7 +582,7 @@ class MapDriverController extends GetxController {
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
recentDistanceToDash = Get.find<LocationController>().totalDistance;
|
||||
rideTimerFromBegin = i;
|
||||
price = carType == 'Comfort' || carType == 'Free Ride'
|
||||
price = carType == 'Comfort' // || carType == 'Free Ride'
|
||||
? (i ~/ 60) +
|
||||
(recentDistanceToDash *
|
||||
Get.find<HomeCaptainController>().comfortPrice)
|
||||
|
||||
@@ -5,7 +5,9 @@ import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../constant/box_name.dart';
|
||||
import '../../../constant/char_map.dart';
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../constant/credential.dart';
|
||||
import '../../../constant/info.dart';
|
||||
import '../../../constant/style.dart';
|
||||
import '../../../controller/auth/captin/login_captin_controller.dart';
|
||||
@@ -195,60 +197,62 @@ class LoginCaptin extends StatelessWidget {
|
||||
stopPauseOnTap: true,
|
||||
),
|
||||
// IconButton(
|
||||
// onPressed: () async {
|
||||
// // String v =
|
||||
// // await storage.read(key: BoxName.serverAPI) ?? '';
|
||||
// // print(v);
|
||||
// // sql.deleteAllData(TableName.faceDetectTimes);
|
||||
// AC credentials = AC();
|
||||
// // String apiKey = AK.secretKey;
|
||||
// // // // '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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(
|
||||
// '0vQRyaYYDWpsv73A5CZOknseK7S2sgwE', 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');
|
||||
// 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,
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -69,8 +69,7 @@ class DrawerCaptain extends StatelessWidget {
|
||||
horizontal: 4, vertical: 1),
|
||||
color: AppColor.greenColor,
|
||||
child: RatingBar.builder(
|
||||
initialRating: double.parse(
|
||||
Get.find<HomeCaptainController>().rating),
|
||||
initialRating: 5,
|
||||
minRating: 1,
|
||||
direction: Axis.horizontal,
|
||||
itemCount: 5,
|
||||
|
||||
@@ -67,7 +67,7 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
Text(
|
||||
'${mapDriverController.recentDistanceToDash.toStringAsFixed(0)} ${'KM'.tr}'),
|
||||
const Icon(Icons.attach_money),
|
||||
Text(mapDriverController.price.toStringAsFixed(0)),
|
||||
Text(mapDriverController.price.toStringAsFixed(2)),
|
||||
],
|
||||
),
|
||||
(mapDriverController.carType == 'Free Ride' ||
|
||||
|
||||
Reference in New Issue
Block a user