3

In Flutter, I can use Draggable to drag an object, say an image. Also, using InteractiveViewer, I can pinch-zoom the same image. Am able to do these actions separately with the individual widgets, but not able to figure out how to do both together -

  1. Load image
  2. Pinch-zoom out to shrink the image
  3. Drag the above image to another location in the screen

How can I achieve this in Flutter?

sppc42
  • 2,994
  • 2
  • 31
  • 49

1 Answers1

3

If you just want to scale an image (zoom in/out), you don't have to use InteractiveViewer. You can use GestureDetector to do scaling, rotating, and moving, all at once.

You can check out my answer to a similar question here.

WSBT
  • 33,033
  • 18
  • 128
  • 133