onTap method

Widget onTap(
  1. Function? function, {
  2. BorderRadius? borderRadius,
  3. Color? splashColor,
  4. Color? hoverColor,
  5. Color? highlightColor,
})

add tap to parent widget

Implementation

Widget onTap(
  Function? function, {
  BorderRadius? borderRadius,
  Color? splashColor,
  Color? hoverColor,
  Color? highlightColor,
}) {
  return InkWell(
    onTap: function as void Function()?,
    borderRadius: borderRadius ??
        (defaultInkWellRadius != null ? radius(defaultInkWellRadius) : null),
    child: this,
    splashColor: splashColor ?? defaultInkWellSplashColor,
    hoverColor: hoverColor ?? defaultInkWellHoverColor,
    highlightColor: highlightColor ?? defaultInkWellHighlightColor,
  );
}