9/24/1-backLocation

This commit is contained in:
Hamza-Ayed
2024-09-24 13:32:36 +03:00
parent 3313cb0203
commit f5b7307f86
27 changed files with 880 additions and 343 deletions

View File

@@ -53,7 +53,7 @@ class LocationController extends GetxController {
} else if (latitude >= 29.904975 &&
latitude <= 30.143372 &&
longitude >= 30.787030 &&
longitude <= 31.238843) {
longitude <= 31.215009) {
return 'Giza';
} else if (latitude >= 30.396286 &&
latitude <= 31.654458 &&
@@ -61,7 +61,7 @@ class LocationController extends GetxController {
longitude <= 32.626259) {
return 'Alexandria';
} else {
return 'Outside';
return 'Cairo';
}
}
@@ -102,15 +102,7 @@ class LocationController extends GetxController {
endpoint = AppLink.addCarsLocationAlexandriaEndpoint;
Log.print('Endpoint: $endpoint');
break;
case 'Outside':
// Handle cases outside of Cairo, Giza, and Alexandria
print('Location outside Cairo, Giza, or Alexandria');
box.write(BoxName.serverChosen, AppLink.seferCairoServer);
endpoint = AppLink
.addCarsLocationCairoEndpoint; // Fallback to Cairo endpoint
Log.print('Fallback Endpoint: $endpoint');
break;
default:
// Handle any other unexpected cases
print('Unknown location area');