onTapWithEffect method

Widget onTapWithEffect(
  1. VoidCallback? onTap, {
  2. Color? effectColor,
  3. ShapeBorder? shape,
  4. BorderRadius? borderRadius,
})

Implementation

Widget onTapWithEffect(VoidCallback? onTap, {Color? effectColor, ShapeBorder? shape, BorderRadius? borderRadius}) {
  var config = JBConfig.tapEffectConfig;
  return Material(
    color: Colors.transparent,
    shape: shape,
    child: InkWell(
      onTap: onTap,
      splashColor: effectColor ?? config.splashColor,
      highlightColor: effectColor ?? config.highlightColor,
      hoverColor: config.hoverColor,
      hoverDuration: config.hoverDuration,
      focusColor: config.focusColor,
      mouseCursor: config.mouseCursor,
      customBorder: shape,
      borderRadius: borderRadius,
      child: this,
    ),
  );
}