feat: Implement TertiaryTapCallbacks on new event system (#3899)
Following up on [our events master
plan](https://docs.google.com/document/d/1nBUup9QCPioVwWL1zs79z1hWF882tAYfNywFMdye2Qc).
This adds `TertiaryTapCallbacks` and necessary infrastructure to make it
work.
This replaces the old `TertiaryTapDetector` (which we can deprecate
later), e.g.:
```dart
class MyGame extends FlameGame with TertiaryTapDetector {
@override
void onTertiaryTapDown(TapDownInfo info) {
// game-level handling
}
}
```
With `TertiaryTapCallbacks` following the newer patterns in flame:
```dart
class MiddleClickSquare extends RectangleComponent with TertiaryTapCallbacks {
@override
void onTertiaryTapDown(TertiaryTapDownEvent event) {
// component-level handling, with hit detection
}
@override
void onTertiaryTapUp(TertiaryTapUpEvent event) {
// tertiary tap finished
}
}
```
Note that this new detector uses the same dispatcher as secondary, as
they share the same underlying flutter recognizer. This is in line with
my refactor on https://github.com/flame-engine/flame/pull/3900 -
basically we allow for multiple callbacks to register the same detector,
handling deduplication and bindings.
Also adds example, tests, and documentation. L
Luan Nico committed
933395e233bf8a84aff435352054cd357c6acfa2
Parent: 84b77a0
Committed by GitHub <noreply@github.com>
on 5/3/2026, 2:25:50 PM