fix: make pinch-to-zoom work again after adding edge gestures#965
Draft
schembriaiden wants to merge 1 commit intoDonutWare:developfrom
Draft
fix: make pinch-to-zoom work again after adding edge gestures#965schembriaiden wants to merge 1 commit intoDonutWare:developfrom
schembriaiden wants to merge 1 commit intoDonutWare:developfrom
Conversation
eb245c9 to
b5e9862
Compare
PartyDonut
requested changes
Apr 28, 2026
| heightFactor: 0.8, | ||
| child: GestureDetector( | ||
| behavior: HitTestBehavior.translucent, | ||
| onVerticalDragStart: (details) => _handleVerticalDragStart(details, isLeft: true), |
Collaborator
There was a problem hiding this comment.
This seems very hacky to have two GestureDetectors.
We should be able to infer the location of the drag using the DragStartDetails
b5e9862 to
7e8f174
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
This pull request updates the touch gesture handling for vertical drag actions in the video player controls. The main improvement is to restrict vertical drag gestures for brightness and volume to the left and right edges of the screen, reducing accidental activations and aligning with common video player UX patterns.
Touch gesture improvements:
lib/screens/video_player/video_player_controls.dart)_handleVerticalDragStartmethod now takes an explicitisLeftparameter, determined by which edge zone the gesture started in, rather than calculating the side based on the touch position. This makes the logic clearer and more maintainable. (lib/screens/video_player/video_player_controls.dart)Issue Being Fixed
After the last update I noticed an issue where the pinch-to-zoom was a bit inconsistent due to the new edge gestures I added, this update aims to fix that by making the edge gestures take up only the 15% edges of the screen and the middle is saved for the pinch to zoom. Before it was a 50/50 split for the edge gestures, which was a bit shortsighted from my end.
Screenshots / Recordings
Tested On
Checklist