Fixes hide controls when zoomed and shows them when not zoomed (#3366)

This commit is contained in:
martyfuhry
2023-07-22 15:56:49 -04:00
committed by GitHub
parent 7f35583c2c
commit 1e8fc7266c

View File

@@ -499,6 +499,7 @@ class GalleryViewerPage extends HookConsumerWidget {
PhotoViewGallery.builder(
scaleStateChangedCallback: (state) {
isZoomed.value = state != PhotoViewScaleState.initial;
ref.read(showControlsProvider.notifier).show = !isZoomed.value;
},
pageController: controller,
scrollPhysics: isZoomed.value