refactor: migrate amount fields to decimal and implement location service restriction for unsupported regions
This commit is contained in:
@@ -736,11 +736,9 @@ class HomeCaptainController extends GetxController {
|
||||
);
|
||||
|
||||
if (locData != null && locData.latitude != null) {
|
||||
myLocation = LatLng(locData.latitude!, locData.longitude!);
|
||||
print(
|
||||
"📍 [HomeCaptain] Location updated: ${myLocation.latitude}, ${myLocation.longitude}");
|
||||
|
||||
if (!CountryPolygons.isServiceSupported(myLocation)) {
|
||||
final rawPos = LatLng(locData.latitude!, locData.longitude!);
|
||||
if (!CountryPolygons.isServiceSupported(rawPos)) {
|
||||
myLocation = const LatLng(31.9539, 35.9106);
|
||||
if (!Get.isSnackbarOpen) {
|
||||
Get.snackbar(
|
||||
'Alert'.tr,
|
||||
@@ -754,7 +752,11 @@ class HomeCaptainController extends GetxController {
|
||||
isDismissible: true,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
myLocation = rawPos;
|
||||
}
|
||||
print(
|
||||
"📍 [HomeCaptain] Location updated: ${myLocation.latitude}, ${myLocation.longitude}");
|
||||
} else {
|
||||
print(
|
||||
"⚠️ [HomeCaptain] Could not get current location, using default.");
|
||||
|
||||
Reference in New Issue
Block a user