This commit is contained in:
Hamza-Ayed
2023-12-14 23:09:46 +03:00
parent 2ff52420ce
commit c2fd1187d0
19 changed files with 523 additions and 195 deletions

View File

@@ -1,18 +1,11 @@
import 'dart:convert';
import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import 'package:get/get.dart';
import 'package:ride/controller/functions/llama_ai.dart';
import 'package:ride/env/env.dart';
import '../../../constant/api_key.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';
@@ -197,62 +190,62 @@ 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 = 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');
// 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');
String retrievedStringS = credentials.r(
credentials.r(
credentials.r(convertedStringN, cn), cC),
cs);
print('Retrieved String: $retrievedStringS');
// 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); //
// // 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,
),
),
// // print(' ENV is ' + Env.chatGPTkey); //
// // // print('storage is ' + v); //
// // print('storage is ' + apiKeyf!); //
// },
// icon: const Icon(
// Icons.close,
// color: AppColor.blueColor,
// ),
// ),
],
),
)