photo_view icon indicating copy to clipboard operation
photo_view copied to clipboard

[BUG] Double tap not returning to original scale when using PhotoViewGestureDetectorScope

Open amitrotner opened this issue 3 years ago • 0 comments

Describe the bug

While wrapping a PhotoView widget with a PhotoViewGestureDetectorScope, doing a double tap zooms in but when reaching the max scale, a double tap does nothing and not returning to the original scale.

To Reproduce

PhotoViewGestureDetectorScope(
                              axis: Axis.vertical,
                              child: PhotoView(
                                initialScale: PhotoViewComputedScale.contained,
                                controller: controller,
                                maxScale: PhotoViewComputedScale.covered * 2,
                                minScale: PhotoViewComputedScale.contained,
                                imageProvider: getImage(),
                                loadingBuilder: (context, _progress) => Center(
                                  child: Container(
                                    width: 24.0,
                                    height: 24.0,
                                    child: CircularProgressIndicator(
                                      value: _progress == null ? null : _progress.cumulativeBytesLoaded / _progress.expectedTotalBytes,
                                    ),
                                  ),
                                ),
                                backgroundDecoration: BoxDecoration(color: MainStyle.blackColor),
                                heroAttributes: PhotoViewHeroAttributes(tag: widget.tag),
                              ),
                            ),

Edit: Happens only in Android and not in iOS

amitrotner avatar Feb 25 '21 12:02 amitrotner