ripple method

InkWell ripple({
  1. GestureTapCallback? onTap,
  2. GestureTapCallback? onDoubleTap,
  3. GestureLongPressCallback? onLongPress,
  4. GestureTapDownCallback? onTapDown,
  5. GestureTapUpCallback? onTapUp,
  6. GestureTapCancelCallback? onTapCancel,
  7. ValueChanged<bool>? onHighlightChanged,
  8. ValueChanged<bool>? onHover,
  9. MouseCursor? mouseCursor,
  10. Color? focusColor,
  11. Color? hoverColor,
  12. Color? highlightColor,
  13. MaterialStateProperty<Color?>? overlayColor,
  14. Color? splashColor,
  15. InteractiveInkFeatureFactory? splashFactory,
  16. double? radius,
  17. BorderRadius? borderRadius,
  18. ShapeBorder? customBorder,
  19. bool? enableFeedback = true,
  20. bool excludeFromSemantics = false,
  21. FocusNode? focusNode,
  22. bool canRequestFocus = true,
  23. ValueChanged<bool>? onFocusChange,
  24. bool autofocus = false,
})

Modifiers for adding ripple effect on widget, and their gestures actions. This utilizes Flutter built-in InkWell widget.

Implementation

InkWell ripple(
    {GestureTapCallback? onTap,
    GestureTapCallback? onDoubleTap,
    GestureLongPressCallback? onLongPress,
    GestureTapDownCallback? onTapDown,
    GestureTapUpCallback? onTapUp,
    GestureTapCancelCallback? onTapCancel,
    ValueChanged<bool>? onHighlightChanged,
    ValueChanged<bool>? onHover,
    MouseCursor? mouseCursor,
    Color? focusColor,
    Color? hoverColor,
    Color? highlightColor,
    MaterialStateProperty<Color?>? overlayColor,
    Color? splashColor,
    InteractiveInkFeatureFactory? splashFactory,
    double? radius,
    BorderRadius? borderRadius,
    ShapeBorder? customBorder,
    bool? enableFeedback = true,
    bool excludeFromSemantics = false,
    FocusNode? focusNode,
    bool canRequestFocus = true,
    ValueChanged<bool>? onFocusChange,
    bool autofocus = false}) {
  return InkWell(
    onTap: onTap,
    onDoubleTap: onDoubleTap,
    onLongPress: onLongPress,
    onTapDown: onTapDown,
    onTapUp: onTapUp,
    onTapCancel: onTapCancel,
    onHighlightChanged: onHighlightChanged,
    onHover: onHover,
    mouseCursor: mouseCursor,
    focusColor: focusColor,
    hoverColor: hoverColor,
    highlightColor: highlightColor,
    overlayColor: overlayColor,
    splashColor: splashColor,
    splashFactory: splashFactory,
    radius: radius,
    borderRadius: borderRadius,
    customBorder: customBorder,
    enableFeedback: enableFeedback,
    excludeFromSemantics: excludeFromSemantics,
    focusNode: focusNode,
    canRequestFocus: canRequestFocus,
    onFocusChange: onFocusChange,
    autofocus: autofocus,
    child: this,
  );
}