2026-02-19

This commit is contained in:
Hamza-Ayed
2026-02-19 00:33:43 +03:00
parent 38f7abcd59
commit 0b826f6e01
15 changed files with 57 additions and 52 deletions

View File

@@ -42,15 +42,17 @@ android {
// Merged the two defaultConfig sections into one. This is the correct way.
defaultConfig {
applicationId = "com.intaleq_driver"
minSdkVersion = 23
minSdkVersion = flutter.minSdkVersion
targetSdk = 36
versionCode = 57
versionName = '1.1.57' // I've used the higher version name
versionCode = 59
versionName = '1.1.59' // I've used the higher version name
multiDexEnabled = true
ndk {
abiFilters "armeabi-v7a", "arm64-v8a" // Keep these!
}
manifestPlaceholders += [mapsApiKey: keystoreProperties['mapsApiKey'] ?: ""]
}
signingConfigs {

View File

@@ -46,7 +46,9 @@
android:name="io.flutter.embedding.android.BackgroundExecutor.DART_LIBRARY_URI"
android:value="main.dart" /> -->
<!-- خرائط + إشعارات فFirebase (قناة افتراضية) -->
<meta-data android:name="com.google.android.geo.API_KEY" android:value="@string/api_key" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="${mapsApiKey}" />
<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/default_notification_channel_id" />
<meta-data android:name="io.flutter.embedding.android.EnableImpeller" android:value="false" />

View File

@@ -3,9 +3,9 @@
<!-- <string name="default_notification_channel_id">ride_channel</string> -->
<!-- <string name="default_notification_channel_id">default_channel</string> -->
<string name="default_notification_channel_id">high_importance_channel</string>
<string name="api_key">AIzaSyACAeqD8qnNYwHKj1qRec6F3AKzdo__CiQ</string>
<string name="api_key">e</string>
<string name="security_warning_title">Security Warning</string>
<string name="api_key_safety">AIzaSyB04YNW3LbvmQ5lX1t2bOwEU18-KUoovzw</string>
<string name="api_key_safety">AIzaSyB04YNW3LbvmQ5lX1t2bOwEU18-</string>
<string name="label">Intaleq Driver</string>
<string name="security_warning_message">A security issue or modification has been detected on

View File

@@ -1,24 +1,5 @@
// allprojects {
// repositories {
// google()
// mavenCentral()
// }
// }
// rootProject.buildDir = "../build"
// subprojects {
// project.buildDir = "${rootProject.buildDir}/${project.name}"
// }
// subprojects {
// project.evaluationDependsOn(":app")
// }
// tasks.register("clean", Delete) {
// delete rootProject.buildDir
// }
buildscript {
ext.kotlin_version = '1.9.23'
ext.kotlin_version = '2.1.0'
repositories {
google()
mavenCentral()

View File

@@ -13,6 +13,7 @@ class BoxName {
static const String FCM_PRIVATE_KEY = "FCM_PRIVATE_KEY";
static const String hmac = "hmac";
static const String ttsEnabled = "ttsEnabled";
static const String security_check = "security_check";
static const String rideType = "rideType";
static const String walletType = "walletType";
static const String fingerPrint = "fingerPrint";

View File

@@ -128,13 +128,11 @@ class LoginDriverController extends GetxController {
var dev = '';
getJwtWallet() async {
final random = Random();
if (random.nextBool()) {
await SecurityHelper.performSecurityChecks();
} else {
await SecurityChecks.isDeviceRootedFromNative(Get.context!);
if (box.read(BoxName.security_check).toString() != 'passed') {
Log.print('Security check failed');
return;
}
Log.print('Security check passed');
String fingerPrint = await DeviceHelper.getDeviceFingerprint();
// print('fingerPrint: ${fingerPrint}');
dev = Platform.isAndroid ? 'android' : 'ios';

View File

@@ -35,14 +35,14 @@ Future<void> showDriverGiftClaim(BuildContext context) async {
if (box.read(BoxName.is_claimed).toString() == '0' ||
box.read(BoxName.is_claimed) == null) {
MyDialog().getDialog(
'You have gift 30000 SYP'.tr, 'This for new registration'.tr, () async {
'You have gift 300 SYP'.tr, 'This for new registration'.tr, () async {
Get.back();
var res = await CRUD().post(link: AppLink.updateDriverClaim, payload: {
'driverId': box.read(BoxName.driverID),
});
if (res != 'failure') {
Get.find<CaptainWalletController>()
.addDriverWallet('new driver', '30000', '30000');
.addDriverWallet('new driver', '300', '300');
Confetti.launch(
context,
options:

View File

@@ -265,6 +265,8 @@ class SecurityHelper {
// print("security_warning".tr); //using easy_localization
// Use a more robust approach to show a warning, like a dialog:
_showSecurityWarning();
} else {
box.write(BoxName.security_check, 'passed');
}
}

View File

@@ -2,6 +2,9 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import '../../constant/box_name.dart';
import '../../main.dart';
class SecurityChecks {
static const platform = MethodChannel(
'com.intaleq_driver/security'); // Choose a unique channel name
@@ -39,6 +42,8 @@ class SecurityChecks {
),
);
} else {
box.write(BoxName.security_check, 'passed');
// Continue with normal app flow
print("Device is secure.");
}

View File

@@ -1585,7 +1585,7 @@ class MapDriverController extends GetxController {
/// **جلب ورسم المسار (OSRM - New Standard System)**
///
/// تستخدم السيرفر الجديد: https://routesjo.intaleq.xyz/route/v1/driving
/// تستخدم السيرفر الجديد: https://routesy.intaleq.xyz/route/v1/driving
Future<void> getRoute({
required LatLng origin,
required LatLng destination,
@@ -1596,7 +1596,7 @@ class MapDriverController extends GetxController {
'${origin.longitude},${origin.latitude};${destination.longitude},${destination.latitude}';
// استخدام الرابط من الكلاس المرجعي لأنه أحدث
var url =
"https://routesjo.intaleq.xyz/route/v1/driving/$coordinates?steps=true&overview=full";
"https://routesy.intaleq.xyz/route/v1/driving/$coordinates?steps=true&overview=full";
try {
var response = await http.get(Uri.parse(url));

View File

@@ -264,7 +264,7 @@ class OrderRequestController extends GetxController
// حماية من الإحداثيات الصفرية
if (start.latitude == 0 || end.latitude == 0) return null;
String apiUrl = "https://routesjo.intaleq.xyz/route/v1/driving";
String apiUrl = "https://routesy.intaleq.xyz/route/v1/driving";
String coords =
"${start.longitude},${start.latitude};${end.longitude},${end.latitude}";
String url = "$apiUrl/$coords?steps=false&overview=full";

View File

@@ -62,7 +62,7 @@ class NavigationController extends GetxController {
// الرابط الجديد
static const String _routeApiBaseUrl =
"https://routesjo.intaleq.xyz/route/v1/driving";
"https://routesy.intaleq.xyz/route/v1/driving";
@override
void onInit() {

View File

@@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -12,7 +13,9 @@ import '../../main.dart';
import '../../onbording_page.dart';
import '../../print.dart';
import '../functions/encrypt_decrypt.dart';
import '../functions/package_info.dart';
import '../functions/secure_storage.dart';
import '../functions/security_checks.dart';
// Assuming you have a home page to navigate to after successful login.
// If not, you might need to adjust the navigation target.
@@ -32,6 +35,17 @@ class SplashScreenController extends GetxController
super.onInit();
_setupAnimations();
_initializeAndNavigate();
checkSecurity();
}
checkSecurity() async {
final random = Random();
if (random.nextBool()) {
await SecurityHelper.performSecurityChecks();
} else {
await SecurityChecks.isDeviceRootedFromNative(Get.context!);
}
}
void _setupAnimations() {

View File

@@ -4,10 +4,10 @@ class Log {
Log._();
static void print(String value, {StackTrace? stackTrace}) {
developer.log(value, name: 'LOG', stackTrace: stackTrace);
// developer.log(value, name: 'LOG', stackTrace: stackTrace);
}
static Object? inspect(Object? object) {
return developer.inspect(object);
// return developer.inspect(object);
}
}

View File

@@ -1490,26 +1490,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
source: hosted
version: "10.0.9"
version: "11.0.2"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
version: "3.0.9"
version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "3.0.2"
lints:
dependency: transitive
description:
@@ -1642,10 +1642,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
url: "https://pub.dev"
source: hosted
version: "1.16.0"
version: "1.17.0"
mgrs_dart:
dependency: transitive
description:
@@ -2278,10 +2278,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
url: "https://pub.dev"
source: hosted
version: "0.7.4"
version: "0.7.7"
timezone:
dependency: transitive
description:
@@ -2422,10 +2422,10 @@ packages:
dependency: transitive
description:
name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version: "2.2.0"
vibration:
dependency: "direct main"
description: