getAnimationState method
Получение текущего состояния анимации
Implementation
AnimationState getAnimationState() {
final scroll = _comicsViewModel.scroll;
final translate = Animation.interpolateAnimations<TranslateAnimation>(
layer.animations,
_selectedAnim,
scroll,
TranslateAnimation.createDefault,
);
final rotate = Animation.interpolateAnimations<RotateAnimation>(
layer.animations,
_selectedAnim,
scroll,
RotateAnimation.createDefault,
);
final scale = Animation.interpolateAnimations<ScaleAnimation>(
layer.animations,
_selectedAnim,
scroll,
ScaleAnimation.createDefault,
);
final alpha = Animation.interpolateAnimations<AlphaAnimation>(
layer.animations,
_selectedAnim,
scroll,
AlphaAnimation.createDefault,
);
return AnimationState(
translateX: translate.x.toDouble(),
translateY: translate.y.toDouble(),
rotation: rotate.angle,
scaleX: scale.scaleX,
scaleY: scale.scaleY,
alpha: alpha.alpha,
);
}