onTap method

Widget onTap(
  1. VoidCallback? action
)

Adds a gesture detector to a widget

Implementation

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