update for reorder and location points

This commit is contained in:
Mohamed Nouffer
2022-09-01 19:14:18 +05:30
parent a4adf24e99
commit 09ac737de5
12 changed files with 196 additions and 143 deletions

View File

@ -360,7 +360,7 @@ void login(String email, String password, BuildContext context){
void loadLocationforSubPerf(String subperf, MapController mapController) async {
String cat = currentCat.isNotEmpty == true ? currentCat[0] : "";
if(currentCat[0] == "-all-"){
if(currentCat.isNotEmpty && currentCat[0] == "-all-"){
cat = "";
}
LocationService.loadLocationsSubFor(subperf, cat).then((value){
@ -371,6 +371,9 @@ void login(String email, String password, BuildContext context){
void loadCustomLocation(String customarea) async {
String cat = currentCat.isNotEmpty == true ? currentCat[0] : "";
if(currentCat.isNotEmpty && currentCat[0] == "-all-"){
cat = "";
}
print("----- ${customarea}");
LocationService.loadCustomLocations(customarea, cat).then((value){
locations.clear();
@ -390,7 +393,11 @@ void login(String email, String password, BuildContext context){
if(is_custom_area_selected.value == true){
return;
}
locations.clear();
String cat = currentCat.isNotEmpty ? currentCat[0] : "";
if(currentCat.isNotEmpty && currentCat[0] == "-all-"){
cat = "";
}
LatLngBounds bounds = mapController!.bounds!;
currentBound.clear();
currentBound.add(bounds);
@ -401,7 +408,6 @@ void login(String email, String password, BuildContext context){
if(value == null){
return;
}
locations.clear();
if(value != null && value.collection.isEmpty){
if(showPopup == false) {
return;