onTap method

GestureDetector onTap(
  1. VoidCallback callback
)

Wraps the current Widget in a GestureDetector widget with a tap gesture callback.

Implementation

GestureDetector onTap(VoidCallback callback) =>
    GestureDetector(onTap: callback, child: this);