moveToTargetAnimated method
void
moveToTargetAnimated({
- required PositionComponent target,
- EffectController? effectController,
- double? zoom,
- double? angle,
- dynamic onComplete()?,
- bool followTarget = true,
Implementation
void moveToTargetAnimated({
required PositionComponent target,
EffectController? effectController,
double? zoom,
double? angle,
Function()? onComplete,
bool followTarget = true,
}) {
moveToPositionAnimated(
position: target.position,
effectController: effectController,
zoom: zoom,
angle: angle,
onComplete: () {
if (followTarget) {
follow(target);
}
onComplete?.call();
},
);
}