setup method

void setup({
  1. required AnimationController controller,
  2. required double value,
  3. Curve curve = Curves.easeOutExpo,
  4. double? initialValue,
  5. ChartDoubleAnimation? oldAnimation,
})

Initialize animation.

Implementation

void setup({
  required AnimationController controller,
  required double value,
  Curve curve = Curves.easeOutExpo,
  double? initialValue,
  ChartDoubleAnimation? oldAnimation,
}) {
  final Animation<double> animation = Tween<double>(
    begin: oldAnimation?._lastValue ?? initialValue ?? value,
    end: value,
  ).animate(
    CurvedAnimation(
      parent: controller,
      curve: curve,
    ),
  );
  _animation = animation;
}