update for get listview update
This commit is contained in:
@ -164,7 +164,15 @@ void login(String email, String password, BuildContext context){
|
||||
Get.toNamed(AppPages.INITIAL);
|
||||
}else{
|
||||
is_loading.value = false;
|
||||
Get.snackbar("Failed", "User login failed, please try again.");
|
||||
Get.snackbar(
|
||||
"Failed",
|
||||
"User login failed, please try again.",
|
||||
icon: Icon(Icons.error, size: 40.0, color: Colors.blue),
|
||||
snackPosition: SnackPosition.TOP,
|
||||
duration: Duration(milliseconds: 800),
|
||||
backgroundColor: Colors.yellow,
|
||||
//icon:Image(image:AssetImage("assets/images/dora.png"))
|
||||
);
|
||||
}
|
||||
|
||||
});
|
||||
@ -181,7 +189,15 @@ void login(String email, String password, BuildContext context){
|
||||
Get.toNamed(AppPages.INITIAL);
|
||||
}else{
|
||||
is_loading.value = false;
|
||||
Get.snackbar("Failed", "User registration failed, please try again.");
|
||||
Get.snackbar(
|
||||
"Failed",
|
||||
"User registration failed, please try again.",
|
||||
icon: Icon(Icons.error, size: 40.0, color: Colors.blue),
|
||||
snackPosition: SnackPosition.TOP,
|
||||
duration: Duration(milliseconds: 800),
|
||||
backgroundColor: Colors.yellow,
|
||||
//icon:Image(image:AssetImage("assets/images/dora.png"))
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -331,6 +347,8 @@ void login(String email, String password, BuildContext context){
|
||||
void loadLocationsBound(){
|
||||
String cat = currentCat.isNotEmpty ? currentCat[0] : "";
|
||||
LatLngBounds bounds = mapController!.bounds!;
|
||||
currentBound.clear();
|
||||
currentBound.add(bounds);
|
||||
//print(currentCat);
|
||||
if(bounds.southEast != null && bounds.southWest != null && bounds.northEast != null && bounds.southEast != null ){
|
||||
LocationService.loadLocationsBound(bounds.southWest!.latitude, bounds.southWest!.longitude, bounds.northWest.latitude, bounds.northWest.longitude, bounds.northEast!.latitude, bounds.northEast!.longitude, bounds.southEast.latitude, bounds.southEast.longitude, cat).then((value){
|
||||
@ -338,20 +356,21 @@ void login(String email, String password, BuildContext context){
|
||||
if(value == null){
|
||||
return;
|
||||
}
|
||||
locations.clear();
|
||||
if(value != null && value.collection.isEmpty){
|
||||
Get.snackbar(
|
||||
"Too many Points",
|
||||
"please zoom in",
|
||||
icon: Icon(Icons.person, color: Colors.white),
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
icon: Icon(Icons.assistant_photo_outlined, size: 40.0, color: Colors.blue),
|
||||
snackPosition: SnackPosition.TOP,
|
||||
duration: Duration(milliseconds: 800),
|
||||
backgroundColor: Colors.yellow,
|
||||
//icon:Image(image:AssetImage("assets/images/dora.png"))
|
||||
);
|
||||
//Get.showSnackbar(GetSnackBar(message: "Too many points, please zoom in",));
|
||||
}
|
||||
if(value != null && value.collection.isNotEmpty){
|
||||
//print("---- added---");
|
||||
locations.clear();
|
||||
locations.add(value);
|
||||
loadCatsv2();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user