Im currently building a Slider widget which multiple handle and am currently implementing the Gesture Detector. I am having an issue where if you touch/drag the screen with a se
According to the class reference:
Attempts to recognize gestures that correspond to its non-null callbacks.
So if you write it like this:
GestureDetector(
onDragUpdate: (updateDetails) {
// Single finger drag, update your handlers
},
onPanDown: (_){},
onPanStart: (_){},
onPanUpdate: (_){},
onPanEnd: (_){},
onPanCancel: (){},
child: Container(
color: Colors.yellow,
child: Text('TURN LIGHTS ON'),
),
)
It won't react on multi-touch, so you don't have to disable anything
UPD: according to question edit, you should set empty but non-null callbacks for all multi-touch events, so two fingers drag will be handled by empty callback, but single finger not
Whilst I was working on another separate problem I happened to have also solved this problem by using the solution here