update
This commit is contained in:
@ -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!);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user