update to server location popup

This commit is contained in:
Mohamed Nouffer
2022-10-30 21:43:29 +05:30
parent 2d9f7a9633
commit d16d97f64f
17 changed files with 700 additions and 241 deletions

View File

@ -46,22 +46,23 @@ class DestinationWidget extends StatelessWidget {
}
}
bool getSelection(int index){
bool ret = false;
destinationController.destination_index_data.forEach((element) {
if(index == element["index"]){
if(element["selected"] == true){
ret = true;
return;
}
}
});
return ret;
}
// bool getSelection(int index){
// bool ret = false;
// destinationController.destination_index_data.forEach((element) {
// if(index == element["index"]){
// if(element["selected"] == true){
// ret = true;
// return;
// }
// }
// });
// return ret;
// }
void doDelete() {
destinationController.currentSelectedDestinations.forEach((element) {
destinationController.deleteDestination(element);
destinationController.resetRogaining();
});
// destinationController.destination_index_data.forEach((element) {
// //print(element["index"]);
@ -174,13 +175,14 @@ class DestinationWidget extends StatelessWidget {
onTap: () async {
{
Destination? fs = destinationController.destinations[index];
print("----fsf-----${fs}");
print("----fsf-----${fs.location_id}");
if(fs != null){
if(indexController.currentDestinationFeature.length > 0) {
if(indexController.currentDestinationFeature.isNotEmpty) {
indexController.currentDestinationFeature.clear();
}
indexController.currentDestinationFeature.add(fs);
print("--- ndexController.currentDestinationFeature ----- ${ indexController.currentDestinationFeature[0].name} ----");
//indexController.getAction();
showModalBottomSheet(context: context, isScrollControlled: true,
@ -196,7 +198,7 @@ class DestinationWidget extends StatelessWidget {
if(destinationController.currentSelectedDestinations.length > 0){
if(destinationController.currentSelectedDestinations[0].location_id == destinationController.destinations[index].location_id){
destinationController.currentSelectedDestinations.clear();
print("---- fount ----");
print("---- found ----");
destinationController.PopulateDestinations();
return;
}