onTap method

Widget onTap(
  1. VoidCallback? onTap, {
  2. Key? key,
  3. BorderRadius? borderRadius,
  4. Color? splashColor,
  5. Color? highlightColor,
})

Wraps this widget in an InkWell with an onTap handler.

Implementation

Widget onTap(
  VoidCallback? onTap, {
  Key? key,
  BorderRadius? borderRadius,
  Color? splashColor,
  Color? highlightColor,
}) {
  return InkWell(
    key: key,
    onTap: onTap,
    borderRadius: borderRadius,
    splashColor: splashColor,
    highlightColor: highlightColor,
    child: this,
  );
}