TouchRippleSolidEffect constructor

TouchRippleSolidEffect({
  1. required TickerProvider vsync,
  2. required TouchRippleAnimation animation,
  3. 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;
}