This commit is contained in:
Mohamed Nouffer
2022-07-23 19:28:35 +05:30
parent 596ca077af
commit 7739fecdf7
10 changed files with 201 additions and 49 deletions

View File

@ -58,6 +58,7 @@ class IndexController extends GetxController {
String dropdownValue = "9";
String subDropdownValue = "-1";
String areaDropdownValue = "-1";
String cateogory = "-all-";
late Worker _ever;
@ -234,13 +235,13 @@ void login(String email, String password, BuildContext context){
void loadCatsv2(){
dynamic initVal = {'category':'---'};
dynamic initVal = {'category':'-all-'};
LatLngBounds bounds = mapController!.bounds!;
if(bounds.southEast != null && bounds.southWest != null && bounds.northEast != null && bounds.southEast != null ){
cats.clear();
CatService.loadCats(bounds.southWest!.latitude, bounds.southWest!.longitude, bounds.northWest.latitude, bounds.northWest.longitude, bounds.northEast!.latitude, bounds.northEast!.longitude, bounds.southEast.latitude, bounds.southEast.longitude).then((value) {
print(value);
cats.add(value);
cats.clear();
cats.add(initVal);
cats.addAll(value!);
});
}
}