Wrap photo_view inside PhotoViewGestureDetectorScope to improve zoom

This commit is contained in:
Neeraj Gupta 2022-06-27 02:07:42 +05:30
parent a8e9c9d6d5
commit 53fdc04a08
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -70,15 +70,18 @@ class _ZoomableImageState extends State<ZoomableImage>
Widget content;
if (_imageProvider != null) {
content = PhotoView(
imageProvider: _imageProvider,
scaleStateChangedCallback: _scaleStateChangedCallback,
minScale: PhotoViewComputedScale.contained,
gaplessPlayback: true,
heroAttributes: PhotoViewHeroAttributes(
tag: widget.tagPrefix + _photo.tag(),
content = PhotoViewGestureDetectorScope(
axis: Axis.vertical,
child: PhotoView(
imageProvider: _imageProvider,
scaleStateChangedCallback: _scaleStateChangedCallback,
minScale: PhotoViewComputedScale.contained,
gaplessPlayback: true,
heroAttributes: PhotoViewHeroAttributes(
tag: widget.tagPrefix + _photo.tag(),
),
backgroundDecoration: widget.backgroundDecoration,
),
backgroundDecoration: widget.backgroundDecoration,
);
} else {
content = loadWidget;