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.
This commit is contained in:
parent
98aaf00a09
commit
c1e41b4304
@ -1240,7 +1240,7 @@ class GestureDetector extends StatelessWidget {
|
|||||||
/// A widget that detects gestures described by the given gesture
|
/// A widget that detects gestures described by the given gesture
|
||||||
/// factories.
|
/// factories.
|
||||||
///
|
///
|
||||||
/// For common gestures, use a [GestureRecognizer].
|
/// For common gestures, use a [GestureDetector].
|
||||||
/// [RawGestureDetector] is useful primarily when developing your
|
/// [RawGestureDetector] is useful primarily when developing your
|
||||||
/// own gesture recognizers.
|
/// own gesture recognizers.
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user