7/6/5
This commit is contained in:
@@ -27,9 +27,6 @@ class CRUD {
|
||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
||||
},
|
||||
);
|
||||
print(response.request);
|
||||
print(response.body);
|
||||
print(response.statusCode);
|
||||
// if (response.statusCode == 200) {
|
||||
var jsonData = jsonDecode(response.body);
|
||||
if (jsonData['status'] == 'success') {
|
||||
@@ -101,7 +98,6 @@ class CRUD {
|
||||
await arabicTextExtractByVisionAndAI(imagePath: imagePath);
|
||||
var json = jsonDecode(extractedString);
|
||||
var textValues = extractTextFromLines(json);
|
||||
print(textValues);
|
||||
// await Get.put(AI()).geminiAiExtraction(prompt, textValues);
|
||||
await Get.put(AI()).anthropicAI(textValues, prompt, imagePath);
|
||||
}
|
||||
@@ -134,8 +130,6 @@ class CRUD {
|
||||
|
||||
String imagePathFull =
|
||||
'${AppLink.server}/card_image/$imagePath-${box.read(BoxName.driverID)}.jpg';
|
||||
// print(box.read(BoxName.driverID));
|
||||
// print(imagePathFull);
|
||||
var request = http.Request('POST', Uri.parse(
|
||||
// 'https://ocrhamza.cognitiveservices.azure.com/vision/v2.1/ocr?language=ar'));
|
||||
// 'https://eastus.api.cognitive.microsoft.com/vision/v3.2/ocr'
|
||||
@@ -146,7 +140,6 @@ class CRUD {
|
||||
http.StreamedResponse response = await request.send();
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
// print(await response.stream.bytesToString());
|
||||
return await response.stream.bytesToString();
|
||||
} else {}
|
||||
}
|
||||
@@ -224,9 +217,6 @@ class CRUD {
|
||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
||||
},
|
||||
);
|
||||
print(response.request);
|
||||
print(response.body);
|
||||
// print(response.statusCode);
|
||||
var jsonData = jsonDecode(response.body);
|
||||
if (response.statusCode == 200) {
|
||||
if (jsonData['status'] == 'success') {
|
||||
|
||||
@@ -18,7 +18,10 @@ class KeyEncryption {
|
||||
}
|
||||
|
||||
static String decryptKey(String encryptedKey) {
|
||||
print('encryptedKey: ${AK.keyOfApp}');
|
||||
|
||||
final decoded = base64Decode(encryptedKey);
|
||||
print('encryptedKey: $encryptedKey');
|
||||
final iv = encrypt.IV(decoded.sublist(0, 16)); // استخراج التهيئة
|
||||
final encrypted =
|
||||
encrypt.Encrypted(decoded.sublist(16)); // استخراج النص المشفر
|
||||
|
||||
@@ -12,6 +12,7 @@ import '../../constant/info.dart';
|
||||
Future<void> checkForUpdate(BuildContext context) async {
|
||||
final packageInfo = await PackageInfo.fromPlatform();
|
||||
final currentVersion = packageInfo.buildNumber;
|
||||
final version = packageInfo.version;
|
||||
print('currentVersion is : $currentVersion');
|
||||
// Fetch the latest version from your server
|
||||
String latestVersion = await getPackageInfo();
|
||||
@@ -24,7 +25,7 @@ Future<void> checkForUpdate(BuildContext context) async {
|
||||
Future<String> getPackageInfo() async {
|
||||
final response = await CRUD().get(link: AppLink.packageInfo, payload: {
|
||||
"platform": Platform.isAndroid ? 'android' : 'ios',
|
||||
"appName": AppInformation.appName,
|
||||
"appName": AppInformation.appVersion,
|
||||
});
|
||||
|
||||
if (response != 'failure') {
|
||||
@@ -36,7 +37,7 @@ Future<String> getPackageInfo() async {
|
||||
void showUpdateDialog(BuildContext context) {
|
||||
final String storeUrl = Platform.isAndroid
|
||||
? 'https://play.google.com/store/apps/details?id=com.sefer_driver'
|
||||
: 'https://apps.apple.com/ae/app/sefer/id6458734951';
|
||||
: 'https://apps.apple.com/ae/app/sefer-driver/id6502189302';
|
||||
showCupertinoDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
|
||||
@@ -13,6 +13,7 @@ class SmsEgyptController extends GetxController {
|
||||
var headers = {'Content-Type': 'application/json'};
|
||||
|
||||
Future<dynamic> sendSmsEgypt(String phone, otp) async {
|
||||
print('password ==== ${AK.smsPasswordEgypt}');
|
||||
var body = jsonEncode({
|
||||
"username": AppInformation.appName,
|
||||
"password": AK.smsPasswordEgypt, //'E)Pu=an/@Z',
|
||||
|
||||
Reference in New Issue
Block a user