Closed hugovangalen closed 7 years ago
I updated the example to use a Scaffold. Before making your suggested changes, it didn't display at all actually.
Take a look and see if this fixes it on your end: https://github.com/perlatus/flutter_zoomable_image/tree/bugfix_scaffold
Thanks for the bug report.
Yes, come think of it, I do recollect observing a black background at some point.
I was messing around with different layouts trying to pinpoint the issue with the gestures. Depending on the parent widget, the image did not paint at all, or only a part of the image was visible. (I guess that all can be explained if the widget is confused about its own size.)
Anyway, it's okay now. Great!
In the method _child(), it seems like the CustomPaint() that is instantiated requires a valid "child" object in order for the gesture detector to function correctly if used in a Scaffold.
I added an empty container as a child, and then things started working as expected, so I believe this may be related to this mentioned in the docs on CustomPaint: