animateTo method
void
animateTo(})
Implementation
void animateTo(
Matrix4 target, {
Duration duration = const Duration(milliseconds: 250),
Curve curve = Curves.easeInOut,
}) {
if (vsync case final vsync?) {
_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();
}
}