animateZoom method

void animateZoom({
  1. required Vector2 zoom,
  2. EffectController? effectController,
  3. dynamic onComplete()?,
})

Implementation

void animateZoom({
  required Vector2 zoom,
  EffectController? effectController,
  Function()? onComplete,
}) {
  final zoomEffect = ScaleEffect.to(
    zoom,
    effectController ?? EffectController(duration: 1),
    onComplete: onComplete,
  );
  zoomEffect.removeOnFinish = true;
  viewfinder.add(zoomEffect);
}