add method

void add({
  1. required Offset centerToRatio,
  2. required double lowerPercent,
  3. required double upperPercent,
  4. required StartOnEvent startOnEvent,
  5. required Function onClick,
  6. required bool isNotDecided,
  7. int? count,
  8. void onReturn(
    1. dynamic value
    )?,
})

Implementation

void add({
  required Offset centerToRatio,
  required double lowerPercent,
  required double upperPercent,
  required StartOnEvent startOnEvent,
  required Function onClick,
  required bool isNotDecided,
  int? count,
  void Function(dynamic value)? onReturn,
}) {
  final GlobalKey key = GlobalKey();

  keyList.add(key);

  setState(() =>
    children.add(
      RippleEffect(
        key: key,
        count: count,
        centerToRatio: centerToRatio,
        size: widget.size,
        onClick: onClick,
        onReturn: onReturn,
        isNotDecided: isNotDecided,
        startOnEvent: startOnEvent,
        duration: widget.rippleDuration,
        curve: widget.rippleCurve,
        fadeInDuration: widget.rippleFadeInDuration,
        fadeInCurve: widget.rippleFadeInCurve,
        fadeOutDuration: widget.rippleFadeOutDuration,
        fadeOutCurve: widget.rippleFadeOutCurve,
        canceledDuration: widget.canceledRippleDuration,
        canceledCurve: widget.canceledRippleCurve,
        color: widget.color,
        colorTween: widget.colorTween,
        lowerPercent: lowerPercent,
        upperPercent: upperPercent,
      ),
    ),
  );
}