Document defaults of GestureDetector.behavior and link to debugging options (#17785)

This commit is contained in:
Michael Goderbauer 2018-05-23 17:01:19 -07:00 committed by GitHub
parent af764a51a9
commit bf0f4e6b2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,6 +124,11 @@ class GestureRecognizerFactoryWithHandlers<T extends GestureRecognizer> extends
/// ),
/// )
/// ```
///
/// ## Debugging
///
/// To see how large the hit test box of a [GestureDetector] is for debugging
/// purposes, set [debugPaintPointersEnabled] to true.
class GestureDetector extends StatelessWidget {
/// Creates a widget that detects gestures.
///
@ -286,6 +291,9 @@ class GestureDetector extends StatelessWidget {
final GestureScaleEndCallback onScaleEnd;
/// How this gesture detector should behave during hit testing.
///
/// This defaults to [HitTestBehavior.deferToChild] if [child] is not null and
/// [HitTestBehavior.translucent] if child is null.
final HitTestBehavior behavior;
/// Whether to exclude these gestures from the semantics tree. For
@ -477,6 +485,9 @@ class RawGestureDetector extends StatefulWidget {
final Map<Type, GestureRecognizerFactory> gestures;
/// How this gesture detector should behave during hit testing.
///
/// This defaults to [HitTestBehavior.deferToChild] if [child] is not null and
/// [HitTestBehavior.translucent] if child is null.
final HitTestBehavior behavior;
/// Whether to exclude these gestures from the semantics tree. For