animateToColor method
void
animateToColor(
- Color color, {
- Duration duration = const Duration(milliseconds: 500),
- Curve curve = Curves.decelerate,
override
Implementation
@override
void animateToColor(
Color color, {
Duration duration = const Duration(milliseconds: 500),
Curve curve = Curves.decelerate,
}) {
_tween = ColorTween(
begin: this.color ?? const Color(0x00000000),
end: color,
);
generateValues(
duration,
onChange: (value) {
this.color = _tween?.transform(value);
},
onFinish: () {
this.color = color;
},
curve: curve,
);
}