Created
June 14, 2020 21:09
-
-
Save moho12n/ee81bb63376075f288118c2222df98d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onPageChanged: (int index) { | |
setState(() => _index = index); | |
indexMarker = Tools.markersList[index].id; | |
if (Tools.markersList[index].latitude != null && | |
Tools.markersList[index].longitude != null) { | |
newPosition = LatLng( | |
double.tryParse( | |
Tools.markersList[index].latitude), | |
double.tryParse( | |
Tools.markersList[index].longitude)); | |
newCameraPosition = | |
CameraPosition(target: newPosition, zoom: 15); | |
} | |
getMarkers(); | |
mapController | |
.animateCamera(CameraUpdate.newCameraPosition( | |
newCameraPosition)) | |
.then((val) { | |
setState(() {}); | |
}); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment