onTap method

GestureDetector onTap(
  1. VoidCallback onTap
)

Adds a tap handler to the widget.

onTap The callback function to execute when the widget is tapped.

Implementation

GestureDetector onTap(VoidCallback onTap) {
  return GestureDetector(
    onTap: onTap,
    child: this,
  );
}