Skip to content

feat!: Kill ScaleDetector in favour of ScaleCallbacks - #3996

Merged
luanpotter merged 1 commit into
mainfrom
luan.kill-scale
Aug 14, 2026
Merged

feat!: Kill ScaleDetector in favour of ScaleCallbacks#3996
luanpotter merged 1 commit into
mainfrom
luan.kill-scale

Conversation

@luanpotter

Copy link
Copy Markdown
Member

Description

Kill ScaleDetector mixin and associated code from old infra in favour of ScaleCallbacks.

Minor differences:

  • On panning: the old ScaleGestureRecognizer also fired scale events for a single pointer, which the zoom example exploited to pan. MultiDragScaleGestureRecognizer only fires scale once two or more pointers are down, so the example and the docs now combine ScaleCallbacks with DragCallbacks, which is the intended way to do pan + pinch in the new system and no longer needs the old PanDetector/ScaleDetector conflict workaround. The drag handler skips panning while isScaling, since a pinch emits drag events for each pointer as well.
  • On trackpad pinch: ScaleGestureRecognizer handles PointerPanZoom* events via addAllowedPointerPanZoom, which is how a trackpad pinch reaches a scale recognizer. MultiDragScaleGestureRecognizer does not implement this, so nor does our new detectors; however that is an existing gap, and we can close it on followups. This is tangential to this cleanup.

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

@luanpotter
luanpotter marked this pull request as ready for review August 14, 2026 05:19
@luanpotter
luanpotter requested a review from a team August 14, 2026 05:20
@luanpotter
luanpotter merged commit 4dd8782 into main Aug 14, 2026
9 checks passed
@luanpotter
luanpotter deleted the luan.kill-scale branch August 14, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants