Update: 2026-06-25 02:28:33

This commit is contained in:
Hamza-Ayed
2026-06-25 02:28:33 +03:00
parent 1ff13f09ac
commit 98a8a2ae3d
43 changed files with 992 additions and 812 deletions

View File

@@ -303,21 +303,7 @@ class LocationSearchController extends GetxController {
rideLifecycle.resetNoRideSearch();
}
final bool isLoggedIn = box.read(BoxName.isVerified) == '1' &&
box.read(BoxName.passengerID) != null;
if (isLoggedIn) {
try {
getReverseGeocoding(passengerLocation).then((address) {
currentLocationString = address;
update();
});
} catch (e) {
Log.print('Error resolving current location: $e');
}
} else {
Log.print('LocationSearchController: Skipping reverse geocoding call, user not logged in.');
}
Log.print('LocationSearchController: Reverse geocoding deferred — will run when map is idle.');
OfflineMapService.instance
.downloadRegion(passengerLocation, radiusKm: 10.0);
@@ -493,10 +479,22 @@ class LocationSearchController extends GetxController {
}
}
bool _pendingGeocode = true;
void updateCurrentLocationFromCamera(LatLng target) {
Log.print('📍 updateCurrentLocationFromCamera: $target');
newMyLocation = target;
if (_pendingGeocode) {
_pendingGeocode = false;
if (box.read(BoxName.isVerified) == '1') {
getReverseGeocoding(target).then((address) {
currentLocationString = address;
update();
});
}
}
if (startLocationFromMap == true) {
Log.print('📍 Updating startLocationFromMap to $target');
newStartPointLocation = target;
@@ -865,12 +863,7 @@ class LocationSearchController extends GetxController {
mapEngine.heightBottomSheetShown = 250;
update();
Get.snackbar(
'Location Received'.tr,
'Route and prices have been calculated successfully!'.tr,
backgroundColor: AppColor.greenColor,
colorText: Colors.white,
);
mySnackbarInfo('Route and prices have been calculated successfully!'.tr);
}
} else {
Log.print('⚠️ Could not extract valid coordinates from link: $link');