animation method

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

Implementation

@override
List<AnimationController> animation() {
  List<AnimationController> controllers = [];
  for (int i = 0; i < 4; i++) {
    var sizeController = new AnimationController(
        duration: Duration(milliseconds: durations[i]), vsync: context);
    var alphaTween = new Tween(begin: 1.0, end: 0.4).animate(sizeController);
    sizeController.addListener(() {
      scaleDoubles[i] = alphaTween.value;
      postInvalidate();
    });
    controllers.add(sizeController);
  }
  return controllers;
}