setup method
void
setup({
- required AnimationController controller,
- required TextStyle textStyle,
- Curve curve = Curves.easeOutExpo,
- TextStyle? initialTextSyle,
- ChartTextStyleAnimation? oldAnimation,
Initialize animation.
Implementation
void setup({
required AnimationController controller,
required TextStyle textStyle,
Curve curve = Curves.easeOutExpo,
TextStyle? initialTextSyle,
ChartTextStyleAnimation? oldAnimation,
}) {
final Animation<TextStyle> animation = TextStyleTween(
begin: oldAnimation?._lastTextStyle ??
initialTextSyle ??
const TextStyle(
color: Colors.transparent,
),
end: textStyle,
).animate(
CurvedAnimation(
parent: controller,
curve: curve,
),
);
_animation = animation;
}