update
This commit is contained in:
@ -235,11 +235,6 @@ class DestinationController extends GetxController {
|
||||
db.deleteDestination(d.location_id!).then((value){
|
||||
PopulateDestinations();
|
||||
});
|
||||
// DestinationService.deleteDestination(id).then((val){
|
||||
// destination_index_data.clear();
|
||||
// PopulateDestinations();
|
||||
// print("####### dest id : ${id}");
|
||||
// });
|
||||
}
|
||||
|
||||
// ---------- database ------------------///
|
||||
@ -296,29 +291,6 @@ class DestinationController extends GetxController {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// if(indexController.currentUser.isNotEmpty){
|
||||
// int user_id = indexController.currentUser[0]["user"]["id"];
|
||||
// print(user_id);
|
||||
// DestinationService.getDestinations(user_id).then((value){
|
||||
// destinations.clear();
|
||||
// destinations = value;
|
||||
// destinationCount.value = 0;
|
||||
// destinationCount.value = destinations.length;
|
||||
|
||||
// MatrixService.getDestinations(value).then((mat){
|
||||
// print(mat);
|
||||
// matrix = mat;
|
||||
|
||||
// });
|
||||
|
||||
// //var val = value[2]["location"]["id"];
|
||||
// //print("-----current destinations ----- ${val}");
|
||||
// });
|
||||
// }
|
||||
// else{
|
||||
// Get.toNamed(AppPages.LOGIN);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@ -355,40 +327,28 @@ class DestinationController extends GetxController {
|
||||
|
||||
}
|
||||
|
||||
// void makePrevious(GeoJsonFeature fs){
|
||||
|
||||
// if(rog_mode == 1){
|
||||
// DestinationController destinationController = Get.find<DestinationController>();
|
||||
// print("---- destination index--- ${destinationController.destination_index_data} --------");
|
||||
// }
|
||||
// else {
|
||||
|
||||
// GeoJsonFeature<GeoJsonMultiPoint> pt = fs as GeoJsonFeature<GeoJsonMultiPoint>;
|
||||
|
||||
// for(int i=0; i<= locations[0].collection.length - 1; i++){
|
||||
// GeoJsonMultiPoint p = locations[0].collection[i].geometry as GeoJsonMultiPoint;
|
||||
|
||||
// if(p.geoSerie!.geoPoints[0].latitude == pt.geometry!.geoSerie!.geoPoints[0].latitude && p.geoSerie!.geoPoints[0].longitude == pt.geometry!.geoSerie!.geoPoints[0].longitude ){
|
||||
|
||||
// if(currentFeature.length > 0){
|
||||
// currentFeature.clear();
|
||||
// }
|
||||
// if(i == 0 ){
|
||||
// currentFeature.add(locations[0].collection[locations[0].collection.length -1] as GeoJsonFeature);
|
||||
// getAction();
|
||||
// }
|
||||
// else{
|
||||
// currentFeature.add(locations[0].collection[i - 1] as GeoJsonFeature);
|
||||
// getAction();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
void makePrevious(Destination pt){
|
||||
|
||||
for(int i=0; i<= destinations.length - 1; i++){
|
||||
Destination p = destinations[i];
|
||||
|
||||
if(p.lat == pt.lat && p.lon == pt.lon ){
|
||||
|
||||
if(indexController.currentDestinationFeature.isNotEmpty){
|
||||
indexController.currentDestinationFeature.clear();
|
||||
}
|
||||
if(i <= 0){
|
||||
indexController.currentDestinationFeature.add(destinations[destinations.length -1]);
|
||||
//getAction();
|
||||
}
|
||||
else{
|
||||
indexController.currentDestinationFeature.add(destinations[i - 1]);
|
||||
//getAction();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user