Introduce multi-touch drag strategies for `DragGestureRecognizer` (#136708)
Fixes #11884 As #38926 pointed out, the current Flutter implementation of multi-finger drag behavior is different from iOS and Android. This change introduces the `MultitouchDragStrategy` attribute, which implements the Android behavior and can be controlled through `ScrollBehavior`, while retaining the ability to extend iOS behavior in the future.
Showing
- packages/flutter/lib/src/gestures/monodrag.dart 35 additions, 2 deletionspackages/flutter/lib/src/gestures/monodrag.dart
- packages/flutter/lib/src/gestures/recognizer.dart 24 additions, 0 deletionspackages/flutter/lib/src/gestures/recognizer.dart
- packages/flutter/lib/src/widgets/scroll_configuration.dart 17 additions, 0 deletionspackages/flutter/lib/src/widgets/scroll_configuration.dart
- packages/flutter/lib/src/widgets/scrollable.dart 2 additions, 0 deletionspackages/flutter/lib/src/widgets/scrollable.dart
- packages/flutter/test/gestures/drag_test.dart 116 additions, 4 deletionspackages/flutter/test/gestures/drag_test.dart
- packages/flutter/test/widgets/scroll_behavior_test.dart 64 additions, 0 deletionspackages/flutter/test/widgets/scroll_behavior_test.dart
Please register or sign in to comment