feat : local location loading

This commit is contained in:
2025-08-19 11:56:04 +03:30
parent 7c3c1280b2
commit b2f26cdffd
4 changed files with 24 additions and 20 deletions

View File

@@ -23,7 +23,7 @@ class MapWidgetLogic extends GetxController with GetTickerProviderStateMixin {
RxList<LatLng> markerLocations = RxList();
RootLogic rootLogic = Get.find<RootLogic>();
late LivestockRepository repository ;
LivestockRepository repository = diLiveStock.get<LivestockRepository>();
@override
void onInit() {
@@ -59,7 +59,7 @@ class MapWidgetLogic extends GetxController with GetTickerProviderStateMixin {
void onReady() {
super.onReady();
determineCurrentPosition();
// getLoc();
getLoc();
}
@override
@@ -151,7 +151,7 @@ class MapWidgetLogic extends GetxController with GetTickerProviderStateMixin {
return rawMarkers.where((marker) => distance(center, marker) <= radiusInMeters).toList();
}
/* Future<void> getLoc() async {
Future<void> getLoc() async {
await Future.delayed(Duration(seconds: 3));
await safeCall(
call: () async => repository.getLocations(),
@@ -160,5 +160,5 @@ class MapWidgetLogic extends GetxController with GetTickerProviderStateMixin {
},
onError: (error, stackTrace) {},
);
}*/
}
}