setup method
void
setup({
- required Color color,
- required AnimationController controller,
- Curve curve = Curves.easeInOut,
- Color? initialColor,
- ChartColorAnimation? oldAnimation,
Initialize animation.
Implementation
void setup({
required Color color,
required AnimationController controller,
Curve curve = Curves.easeInOut,
Color? initialColor,
ChartColorAnimation? oldAnimation,
}) {
final Animation<Color?> animation = ColorTween(
begin: oldAnimation?._lastColor ?? initialColor ?? Colors.transparent,
end: color,
).animate(
CurvedAnimation(
parent: controller,
curve: curve,
),
);
_animation = animation;
}