withEffectAnimation method

Widget withEffectAnimation({
  1. Color effectColor = const Color(0xFF8BB3C5),
  2. Duration duration = const Duration(milliseconds: 2400),
  3. bool repeatWhenDrag = true,
  4. bool autoAnimate = false,
  5. AnimationType animationType = AnimationType.firework,
  6. double? radiusMultiplier,
  7. AnimationPosition position = AnimationPosition.outside,
  8. Offset? customOffset,
  9. EffectAnimationController? controller,
  10. bool touchEnabled = true,
})

Implementation

Widget withEffectAnimation({
  Color effectColor = const Color(0xFF8BB3C5),
  Duration duration = const Duration(milliseconds: 2400),
  bool repeatWhenDrag = true,
  bool autoAnimate = false,
  AnimationType animationType = AnimationType.firework,
  double? radiusMultiplier,
  AnimationPosition position = AnimationPosition.outside,
  Offset? customOffset,
  EffectAnimationController? controller,
  bool touchEnabled = true, // Parameter baru dengan default true
}) {
  return EffectAnimation(
    effectColor: effectColor,
    duration: duration,
    repeatWhenDrag: repeatWhenDrag,
    autoAnimate: autoAnimate,
    animationType: animationType,
    radiusMultiplier: radiusMultiplier,
    position: position,
    customOffset: customOffset,
    controller: controller,
    touchEnabled: touchEnabled, // Tambahkan ke constructor
    child: this,
  );
}