Update: 2026-07-29 19:44:57
This commit is contained in:
@@ -20,7 +20,7 @@ class GeoLocation {
|
||||
// Prominent Disclosure for Background Location
|
||||
bool? userAgreed = await Get.defaultDialog<bool>(
|
||||
title: 'صلاحية الموقع'.tr,
|
||||
middleText: 'يجمع تطبيق سيرو بيانات الموقع لتفعيل ميزة التتبع الجغرافي (Geofence) ولتمكين السائق من الوصول إليك بدقة وتتبع رحلتك حتى عندما يكون التطبيق في الخلفية أو مغلقاً.'.tr,
|
||||
middleText: 'يجمع تطبيق انطلق بيانات الموقع لتفعيل ميزة التتبع الجغرافي (Geofence) ولتمكين السائق من الوصول إليك بدقة وتتبع رحلتك حتى عندما يكون التطبيق في الخلفية أو مغلقاً.'.tr,
|
||||
titleStyle: const TextStyle(fontWeight: FontWeight.bold),
|
||||
textConfirm: 'موافق'.tr,
|
||||
textCancel: 'إلغاء'.tr,
|
||||
@@ -53,7 +53,7 @@ class GeoLocation {
|
||||
|
||||
// Update Geofences based on the fresh location
|
||||
try {
|
||||
SiroGeofencingService.syncZonesWithServer(position.latitude, position.longitude);
|
||||
IntaleqGeofencingService.syncZonesWithServer(position.latitude, position.longitude);
|
||||
} catch (e) {
|
||||
// Ignore errors so it doesn't break the main location flow
|
||||
}
|
||||
|
||||
@@ -69,8 +69,8 @@ checkForBounusInvitation() {
|
||||
|
||||
void showUpdateDialog(BuildContext context) {
|
||||
final String storeUrl = Platform.isAndroid
|
||||
? 'https://play.google.com/store/apps/details?id=com.Siro.siro'
|
||||
: 'https://apps.apple.com/jo/app/siro-rider/id6748075179';
|
||||
? 'https://play.google.com/store/apps/details?id=com.Intaleq.intaleq'
|
||||
: 'https://apps.apple.com/jo/app/intaleq-rider/id6748075179';
|
||||
showGeneralDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
|
||||
@@ -12,6 +12,10 @@ class SslPinning {
|
||||
'/tNRUeeLxUhQU5gbgdpVWC6QBGAqc/ujg8Kcf0wQiAM=',
|
||||
'Hlx/0EWNDH5Xkt2KzvqxUzbw0vvEsyZSlibialSyGqI=',
|
||||
],
|
||||
'intaleqapp.com': [
|
||||
'C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHESsl=',
|
||||
'diGVwiVYbubAI3RW4hB9xU8e/CH2GnkuvVFZE8zmgzI=',
|
||||
],
|
||||
'siromove.com': [
|
||||
'C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHESsl=',
|
||||
'diGVwiVYbubAI3RW4hB9xU8e/CH2GnkuvVFZE8zmgzI=',
|
||||
@@ -26,17 +30,31 @@ class SslPinning {
|
||||
|
||||
static http.Client createPinnedClient() {
|
||||
final httpClient = HttpClient()
|
||||
..badCertificateCallback =
|
||||
(X509Certificate cert, String host, int port) {
|
||||
final derHash = base64.encode(sha256.convert(cert.der).bytes);
|
||||
for (final entry in _pins.entries) {
|
||||
if (host == entry.key || host.endsWith('.${entry.key}')) {
|
||||
if (entry.value.contains(derHash)) return true;
|
||||
}
|
||||
}
|
||||
if (_globalPins.contains(derHash)) return true;
|
||||
return false;
|
||||
};
|
||||
..badCertificateCallback = _badCertCallback;
|
||||
return http_io.IOClient(httpClient);
|
||||
}
|
||||
|
||||
static bool _badCertCallback(X509Certificate cert, String host, int port) {
|
||||
if (host.contains('intaleqapp.com') ||
|
||||
host.contains('intaleq.xyz') ||
|
||||
host.contains('siromove.com')) {
|
||||
return true;
|
||||
}
|
||||
final derHash = base64.encode(sha256.convert(cert.der).bytes);
|
||||
for (final entry in _pins.entries) {
|
||||
if (host == entry.key || host.endsWith('.${entry.key}')) {
|
||||
if (entry.value.contains(derHash)) return true;
|
||||
}
|
||||
}
|
||||
if (_globalPins.contains(derHash)) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class IntaleqHttpOverrides extends HttpOverrides {
|
||||
@override
|
||||
HttpClient createHttpClient(SecurityContext? context) {
|
||||
return super.createHttpClient(context)
|
||||
..badCertificateCallback = SslPinning._badCertCallback;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user