Unverified Commit c1e41b43 authored by fzyzcjy's avatar fzyzcjy Committed by GitHub

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.
parent 98aaf00a
......@@ -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.
///
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment