'Scrollable CustomPaint with Touchable

here the partial code:

return GestureDetector(
    onPanUpdate: (details) => debugPrint("scroll"),
    child: CanvasTouchDetector(
      builder: (context) => CustomPaint(
        size: Size(MediaQuery.of(context).size.width,MediaQuery.of(context).size.height),
        painter: MyPainter(context),
      ),
    ));

I would like to have a scrollable canvas, but onPanUpdate is never triggered. But, if I replace with onDoubleTap, it works. Also, if I remove the CanvasTouchDetector (from Touchable package), onPanUpdate is triggered.

Thank you



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source