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

Panel's closing & draggable snapping #340

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

Conversation

AdnanKhan45
Copy link

Hello there 👋

This is a very useful package that I found and utilize it in my open-source project Google Maps Clone, I find out this is an amazing custom panel which has a limited behaviour and this contribution contribute to it's behaviour and taking it a bit further by adding "Fully Closing Panel Behavior" & "Draggable Snapping Behaviour", these two features works under a boolean flag and do not disturb the existing functionality of the package.

How to use?

SlidingUpPanel(
 allowDraggableSnappingBehaviour: true // false,
 allowFullyPanelClosingBehaviour: true // false
)

I also liked to add some additional things to this amazing panel such as a resizeHandle and a method in the PanelController to open a panel at a desired position named showAt which operates the same as other methods in the PanelController.

You can add a resizeHandle like this:

SlidingUpPanel(
 resizeHandle: YourResizeHandleWidget()
)

You can open Panel at desired position like this:

PanelController.showAt(0.3); // ranges from 0.0 - 1.0

Currently the panel in my Google Maps Clone project might not exist if you're checking it now (24 Feb 2024) but will exist if you're in future 😄. Because this project is from a YouTube Bootcamp and changes reflects with a new video.

If you find out some of the functionality that I added is not working as expected please leave a comment or fix it and make a pull request.

Thanks.

@AdnanKhan45
Copy link
Author

draggableSnapping.mp4
showAtAndFullyClosing.mp4

Here's what I've done. Please merge the pull request or let me know if something needs to be improved.

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