setPositionAnimated abstract method

bool setPositionAnimated(
  1. LocationPoint point,
  2. double duration,
  3. AnimationType type
)

Method is used to move the center of the icon with the specified animation. point Metrics coordinates of the center LocationPoint. duration Animation duration in seconds. type Animation type AnimationType. Returns true if the operation is successful, false otherwise.

Example:

// Set icon position with animation
LocationPoint animatedIconPoint = LocationPoint(250.0, 350.0);
bool animatedSuccess = _iconMapObject!.setPositionAnimated(
 animatedIconPoint,
 1.5,
 AnimationType.CUBIC,
);
print(
 "Set icon position with animation to (${animatedIconPoint.x}, ${animatedIconPoint.y}): $animatedSuccess",
);

Implementation

bool setPositionAnimated(LocationPoint point, double duration, AnimationType type);