onDoubleTap method
Wraps the current Widget
in a GestureDetector
widget with a double tap gesture callback.
This method allows you to easily add a double tap gesture to any widget.
Example:
Text('Double tap me').onDoubleTap(() {
print('Widget double tapped!');
});
@param callback The function to be called when the widget is double tapped.
@return A GestureDetector
widget wrapping the current widget.
Implementation
GestureDetector onDoubleTap(VoidCallback callback) =>
GestureDetector(onDoubleTap: callback, child: this);