animation method
Method to init the animation controllers
Implementation
@override
List<AnimationController> animation() {
var controllers = <AnimationController>[];
var controller = AnimationController(
duration: const Duration(milliseconds: 325), vsync: state);
var translateTween = Tween(begin: 0, end: 0.5).animate(controller);
var alphaTween = IntTween(begin: 255, end: 122).animate(controller);
var rotateTween1 = Tween(begin: 0.0, end: 45.0).animate(controller);
var rotateTween2 = Tween(begin: 0.0, end: -45.0).animate(controller);
controller.addListener(() {
translateX = translateTween.value.toDouble();
alpha = alphaTween.value;
degrees1 = rotateTween1.value;
degrees2 = rotateTween2.value;
postInvalidate();
});
controllers.add(controller);
return controllers;
}