From c1e41b4304fca243a006946da98809c9553f32a8 Mon Sep 17 00:00:00 2001 From: fzyzcjy <5236035+fzyzcjy@users.noreply.github.com> Date: Tue, 25 Apr 2023 02:33:18 +0800 Subject: [PATCH] Tiny fix doc pointing to incorrect widget confusing the readers (#125394) Just a one-word super tiny change, which I encounter today when playing with RawGestureDetector :) The original doc says: > For common gestures, use a [GestureRecognizer](https://api.flutter.dev/flutter/gestures/GestureRecognizer-class.html). [RawGestureDetector](https://api.flutter.dev/flutter/widgets/RawGestureDetector-class.html) is useful primarily when developing your own gesture recognizers. However, for "common gestures", IMHO the doc wants to say `GestureDetector` (because that one has easy-to-use onTap, onLongPress etc). On the other hand, GestureRecognizer should be used together with RawGestureDetector and is a quite low-level thing, and for common gestures people seldom use it. So I guess here it is a typo. --- packages/flutter/lib/src/widgets/gesture_detector.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/widgets/gesture_detector.dart b/packages/flutter/lib/src/widgets/gesture_detector.dart index f27f5b1a3d..eb686b97a5 100644 --- a/packages/flutter/lib/src/widgets/gesture_detector.dart +++ b/packages/flutter/lib/src/widgets/gesture_detector.dart @@ -1240,7 +1240,7 @@ class GestureDetector extends StatelessWidget { /// A widget that detects gestures described by the given gesture /// factories. /// -/// For common gestures, use a [GestureRecognizer]. +/// For common gestures, use a [GestureDetector]. /// [RawGestureDetector] is useful primarily when developing your /// own gesture recognizers. ///