update to init loading
This commit is contained in:
@ -514,13 +514,19 @@ class DestinationController extends GetxController {
|
||||
void onReady() {
|
||||
Get.toNamed(AppPages.LOGIN)!.then((value){
|
||||
if(indexController.currentUser.length > 0) {
|
||||
Get.toNamed(AppPages.INITIAL);
|
||||
LocationService.getLocationsExt().then((value) {
|
||||
String _token = indexController.currentUser[0]["token"];
|
||||
indexController.switchPage(AppPages.INITIAL);
|
||||
LocationService.getLocationsExt(_token).then((value) {
|
||||
if(value != null){
|
||||
print("--- loc ext is - ${value} ----");
|
||||
LatLngBounds bnds = LatLngBounds(LatLng(value[1], value[0]), LatLng(value[3], value[2]));
|
||||
print("--- bnds is - ${bnds} ----");
|
||||
indexController.mapController!.fitBounds(bnds); //.centerZoomFitBounds(bnds);
|
||||
indexController.mapController!.fitBounds(
|
||||
bnds,
|
||||
);
|
||||
indexController.currentBound.clear();
|
||||
indexController.currentBound.add(bnds);
|
||||
indexController.loadLocationsBound();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user