nateshmbhat / touchable

The only flutter library to add gestures and animations to custom shapes you draw on your canvas.
https://pub.dev/packages/touchable
Mozilla Public License 2.0
233 stars 80 forks source link

Example doesn't work out of the box #43

Open mrshootingstar opened 2 years ago

mrshootingstar commented 2 years ago

Steps to repro:

  1. clone this repo.
  2. run the example
  3. click on screen1 button.

You get this error:

Incorrect GestureDetector arguments.

Having both a pan gesture recognizer and a scale gesture recognizer is redundant; scale is a superset of pan.

Just use the scale gesture recognizer.
littlelioncjt commented 2 years ago

The same problem

crumped commented 2 years ago

@mrshootingstar @littlelioncjt based on the answer -> https://stackoverflow.com/a/66122623 You have to add a list of gestures to CanvasTouchDetector it looks something like this:

CanvasTouchDetector( gesturesToOverride: [GestureType.onTapDown], builder: (context) => CustomPaint(...))