flyToLocation method
- LatLng targetLocation
flyToLocation method animates the camera to fly to a specific location on the map.
It takes a LatLng object representing the target location and animates the camera to fly to that location.
The method is asynchronous and returns a Future of void
.
Implementation
void flyToLocation(LatLng targetLocation) {
_mapController?.animateCamera(
CameraUpdate.newCameraPosition(
CameraPosition(
target: targetLocation,
//zoom: 14.4746,
zoom: _zoom,
bearing: _bearing,
tilt: _tilt,
),
),
);
notifyListeners();
}