onTap method

Widget onTap({
  1. VoidCallback? onTap,
})

Detect taps on a widget easily

Implementation

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