This commit is contained in:
Hamza-Ayed
2023-11-21 18:20:31 +03:00
parent 252cecb6ca
commit 1d2ceed031
10 changed files with 225 additions and 87 deletions

View File

@@ -3,10 +3,10 @@ import 'char_map.dart';
import 'credential.dart';
class AK {
static final AC a = AC(); // Create an instance of AC
static final AC a = AC();
static final String publishableKey =
a.r(a.r(a.r(Env.stripePublishableKe, cn), cC), cs);
AC().r(AC().r(AC().r(Env.stripePublishableKe, cn), cC), cs);
static final String secretKey = a.r(a.r(a.r(Env.secretKey, cn), cC), cs);
static final String basicAuthCredentials =
a.r(a.r(a.r(Env.basicAuthCredentials, cn), cC), cs);

View File

@@ -12,8 +12,8 @@ class AC {
if (box.read(BoxName.apiKeyRun).toString() != 'run') {
var res = await CRUD().get(link: AppLink.getApiKey, payload: {});
var decod = jsonDecode(res);
// print(decod);
// Map<String, dynamic> jsonData = {};
print(decod);
Map<String, dynamic> jsonData = {};
for (var i = 0; i < decod['message'].length; i++) {
String h = decod['message'][i]['hashed_key'].toString();
String retrievedString = r(r(r(h, cn), cC), cs);
@@ -23,13 +23,13 @@ class AC {
value: retrievedString.toString(),
);
//
// String name = decod['message'][i]['name'].toString();
// String value = decod['message'][i]['hashed_key'].toString();
String name = decod['message'][i]['name'].toString();
String value = decod['message'][i]['hashed_key'].toString();
// jsonData[name] = value;
jsonData[name] = value;
}
// String jsonString = json.encode(jsonData);
// print(jsonString);
String jsonString = json.encode(jsonData);
print(jsonString);
box.write(BoxName.apiKeyRun, 'run');
}
}

View File

@@ -1,6 +1,9 @@
import 'package:ride/env/env.dart';
class AppLink {
static const String server = 'https://ride.mobile-app.store';
static const String server = 'https://ride.mobile-app.store'; //Env.serverPHP;
static const String googleMapsLink = 'https://maps.googleapis.com/maps/api/';
static const String llama = 'https://api.llama-api.com/chat/completions';
static const String test = "$server/test.php";
//===============firebase==========================
@@ -90,7 +93,7 @@ class AppLink {
"$location/getTotalDriverDurationToday.php";
//==================Blog=============
static const String profile = 'https://ride.mobile-app.store/ride/profile';
static const String profile = '$server/ride/profile';
static const String getprofile = "$profile/get.php";
static const String addprofile = "$profile/add.php";
static const String deleteprofile = "$profile/delete.php";