Skip to content

feat!: Kill MultiTouchTapDetector and MultiTouchDragDetector - #4000

Merged
luanpotter merged 1 commit into
mainfrom
luan.kill-multi
Aug 16, 2026
Merged

feat!: Kill MultiTouchTapDetector and MultiTouchDragDetector#4000
luanpotter merged 1 commit into
mainfrom
luan.kill-multi

Conversation

@luanpotter

Copy link
Copy Markdown
Member

Description

Kill MultiTouchTapDetector and MultiTouchDragDetector in favour of the existing TapCallbacks and DragCallbacks (already supported on both component and flame game level). The pointerId that used to be a callback parameter is now carried on the event (event.pointerId), so multi-touch tracking is unchanged.

The MultiTouchDragDetector/PanDetector conflict assert in GameWidget can die too, along with the note in gesture_input.md explaining that advanced detectors always win the gesture arena (MultiDragScaleDispatcher is our new shape and natively handles this under the hood).

Note that while TapCallbacks has no MultiTouchTapDetector.onTap, Flutter's "tap completed" callback, you can use onTapUp instead.

Also cleans up tangent things, such as the game's MultiTapListener branch in initializeGestures and the matching clause in containsEventHandlerAt, which are now unreachable; the docs for legacy are updated, with generic sessions (which were already referencing other dead code) just shifting to other (still existent) legacy examples (we could just delete it, but I'd rather keep deleting piece-meal with each PR for absolute clarity), and finally general reframing tweaks on that doc around the legacy vs new system.

Finally this is adding the migration entry for the prior removal that I forgot (:facepalm:), alongside this one's.

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 15, 2026 21:13
@luanpotter
luanpotter requested a review from a team August 15, 2026 21:13
Comment thread doc/flame/inputs/gesture_input.md
@luanpotter
luanpotter merged commit 167da17 into main Aug 16, 2026
8 checks passed
@luanpotter
luanpotter deleted the luan.kill-multi branch August 16, 2026 12:58
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