animation method

  1. @override
List<AnimationController> animation()
override

Method to init the animation controllers

Implementation

@override
List<AnimationController> animation() {
  var controllers = <AnimationController>[];
  for (int i = 0; i < 8; i++) {
    var controller = AnimationController(
        duration: const Duration(milliseconds: 500), vsync: state);
    var alphaTween = IntTween(begin: 255, end: 77).animate(controller);
    var scaleTween = Tween(begin: 1.0, end: 0.4).animate(controller);

    controller.addListener(() {
      scaleDoubles[i] = scaleTween.value;
      alphas[i] = alphaTween.value;
      postInvalidate();
    });
    controllers.add(controller);
  }
  return controllers;
}