withEffectAnimation method
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,
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,
);
}