animateTo method
void
animateTo(})
Implementation
void animateTo(
Matrix4 target, {
Duration duration = const Duration(milliseconds: 350),
Curve curve = Curves.easeInOut,
}) {
if (_vsync == null) {
transform = target;
return;
}
_animationController?.stop();
_animationController ??= AnimationController(vsync: _vsync!)
..addListener(_onAnimate);
_animationController!.duration = duration;
_animation = Matrix4Tween(
begin: _transform,
end: target,
).animate(CurvedAnimation(parent: _animationController!, curve: curve));
_animationController!
..reset()
..forward();
}