flyTo abstract method

void flyTo(
  1. Camera camera,
  2. int duration,
  3. CameraCallback callback
)

Moves the map camera to a new position with an easing animation. camera The new camera position Camera. duration Animation duration in milliseconds. callback Callback to execute when the animation completes CameraCallback.

Example:

// Fly to position with smooth animation
Point targetPoint = Point(150.0, 250.0);
Camera targetCamera = Camera(targetPoint, 75.0, 45.0, 30.0);
CameraCallback callback = CameraCallback(
 onMoveFinished: (completed) {
   if (completed) {
     print("Fly to animation completed successfully");
   } else {
     print("Fly to animation was cancelled");
   }
 },
);
_locationWindow!.flyTo(targetCamera, 2000, callback);
print("Started fly to animation to point (${targetPoint.x}, ${targetPoint.y})");

Implementation

void flyTo(Camera camera, int duration, CameraCallback callback);