animation method
Method to init the animation controllers
Implementation
@override
List<AnimationController> animation() {
var controllers = <AnimationController>[];
AnimationController alphaController = AnimationController(
duration: const Duration(milliseconds: 1000), vsync: state);
Animation<int> alpha =
IntTween(begin: 255, end: 0).animate(alphaController);
alpha.addListener(() {
mAlpha = alpha.value;
postInvalidate();
});
// alpha.
controllers.add(alphaController);
AnimationController sizeController = AnimationController(
duration: const Duration(milliseconds: 1000), vsync: state);
sizeController.addListener(() {
mScale = sizeController.value;
});
// alpha.
controllers.add(sizeController);
return controllers;
}