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,
    splashColor: splashColor,
    hoverColor: hoverColor,
    highlightColor: highlightColor,
    child: this,
  );
}