Wrap photo_view inside PhotoViewGestureDetectorScope to improve zoom
This commit is contained in:
parent
a8e9c9d6d5
commit
53fdc04a08
1 changed files with 11 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue