Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] the scaleStateCycle only works when the image is in minScale and also when tapped on the bottom corners of the screen #540

Open
doti19 opened this issue Jun 13, 2023 · 0 comments
Labels
bug Something isn't working
Projects

Comments

@doti19
Copy link

doti19 commented Jun 13, 2023

Describe the bug
This happens when i use PhotoViewGalleryPageOptions, there is nothing odd in my code, i even tried the examples, and still it doesnt work, in samsung. i havent tried it in other platforms.

To Reproduce
just try any PhotoViewGalleryPageOptions, on samsung, then try to double tap. i have seen all the reports that are similar to my problem, and i don't think there is a solution. also i tried clicking by mouse using otg, and it works like expected. the problem is when tapping using a finger. i would really appreciate any workarounds.

What is the current behavior?

Expected behavior
wanted to react to my doubletap

Screenshots

body: PhotoViewGallery.builder(
scrollPhysics: const BouncingScrollPhysics(),
builder: (BuildContext context, int index) {
return PhotoViewGalleryPageOptions(
imageProvider:
AssetImage('assets/images/${widget.imageUrls[index]}'),
// scaleStateController: _scaleStateController,
scaleStateCycle: myScaleStateCycle,
initialScale: PhotoViewComputedScale.contained * 1,
minScale: PhotoViewComputedScale.contained * 0.9,
maxScale: PhotoViewComputedScale.covered * 2,
controller: _controller,
gestureDetectorBehavior: HitTestBehavior.opaque,
);
},
itemCount: widget.imageUrl.length,
pageController: pageController,
),
/////////////////////////////////////////////////////////////////////////////////////////////////////
PhotoViewScaleState myScaleStateCycle(PhotoViewScaleState actual) {
switch (actual) {
case PhotoViewScaleState.zoomedIn:
case PhotoViewScaleState.zoomedOut:
case PhotoViewScaleState.covering:
return PhotoViewScaleState.initial;
case PhotoViewScaleState.initial:
case PhotoViewScaleState.originalSize:
default:
return PhotoViewScaleState.covering;
}
}

Which versions of Flutter/Photo View, and which browser / OS are affected by this issue? Did this work in previous versions of Photo View?
photo_view: ^0.14.0

@doti19 doti19 added the bug Something isn't working label Jun 13, 2023
@doti19 doti19 changed the title [BUG] the scaleStateCycle only works when the image is in minScale, then after that when tapped on the bottom corners of the screen [BUG] the scaleStateCycle only works when the image is in minScale and also when tapped on the bottom corners of the screen Jun 13, 2023
@renancaraujo renancaraujo added this to Needs triage in Bug solving via automation Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Bug solving
  
Needs triage
Development

No branches or pull requests

1 participant