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

Fix animation behavior with negative horizontal offset to support narrower drawer. #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TheMeanCanEHdian
Copy link

@TheMeanCanEHdian TheMeanCanEHdian commented Sep 24, 2021

Currently, flutter_inner_drawer supports using a negative horizontal offset. However, doing so breaks the animation when revealing and hiding the drawer, forcing you to use a minimum horizontal offset of 0.

This change fixes that, allowing drawers that are narrower than half the screen width to be configured. Supporting this is particularly useful for devices in landscape mode like tablets.

The changes to the drift (difference in movement compared to gesture) is almost negligible and is comparable to the drift that already exists.

The value of 2.05 was used when manually tuning as it offered the most similar experience for both positive and negative offsets.

Allows for a negative offset to be used for narrower drawers in landscape.

Co-Authored-By: JonnyWong16 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant