onTap method

GestureDetector onTap(
  1. void onTap()?
)

Returns a new GestureDetector widget with the given onTap callback.

Implementation

GestureDetector onTap(void Function()? onTap) {
  return GestureDetector(onTap: onTap, child: this);
}