feat : local location loading
This commit is contained in:
@@ -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) {},
|
||||
);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user