tweenBack method
Implementation
void tweenBack({
Function? onComplete,
double Function(double)? ease,
double? duration,
}) {
final snapshot = _previousViewportState;
if (snapshot == null) {
return;
}
final currentScale = viewportScale;
_viewport.tween(
duration: duration ?? .2,
scale: snapshot.scale,
ease: ease ?? GEase.easeInOut,
x: snapshot.x,
y: snapshot.y,
onComplete: onComplete,
);
_event.emit(
'zoom',
ZoomEventData(
prevScale: currentScale,
nextScale: _previousViewportState?.scale ?? currentScale,
),
);
}