interpolate method
Интерполяция между анимациями
Implementation
@override
Animation interpolate(Animation current, double scroll) {
final scale = current as ScaleAnimation;
final factor = scale.factor(scroll);
return ScaleAnimation(
start: start,
end: end,
scaleX: scaleX + (scale.scaleX - scaleX) * factor,
scaleY: scaleY + (scale.scaleY - scaleY) * factor,
pivotX: scale.pivotX,
pivotY: scale.pivotY,
);
}