asGestureDetector method

GestureDetector asGestureDetector({
  1. GestureTapCallback? onTap,
  2. GestureTapCallback? onDoubleTap,
  3. GestureLongPressCallback? onLongPress,
  4. void onPanUpdate(
    1. DragUpdateDetails
    )?,
  5. HitTestBehavior? behavior,
})

转换为 GestureDetector,手势检测

Implementation

GestureDetector asGestureDetector({
  GestureTapCallback? onTap,
  GestureTapCallback? onDoubleTap,
  GestureLongPressCallback? onLongPress,
  void Function(DragUpdateDetails)? onPanUpdate,
  HitTestBehavior? behavior,
}) {
  return GestureDetector(
    onTap: onTap,
    onDoubleTap: onDoubleTap,
    onLongPress: onLongPress,
    onPanUpdate: onPanUpdate,
    behavior: behavior,
    child: this,
  );
}