TouchRippleSolidEffect constructor
TouchRippleSolidEffect({
- required TickerProvider vsync,
- required TouchRippleAnimation animation,
- required Color color,
Implementation
TouchRippleSolidEffect({
required TickerProvider vsync,
required TouchRippleAnimation animation,
required this.color,
}) {
_fadeAnimation = AnimationController(
vsync: vsync,
duration: animation.fadeInDuration,
reverseDuration: animation.fadeOutDuration,
);
_fadeCurved = CurvedAnimation(
parent: _fadeAnimation,
curve: animation.fadeInCurve!,
reverseCurve: animation.fadeOutCurve
);
_fadeCurved.addStatusListener((status) {
if (status == AnimationStatus.dismissed) onDispose?.call();
});
isInitialized = true;
}