torbenkeller / expandable_bottom_sheet

MIT License
33 stars 23 forks source link

Make _useDrag public or add a property to allow disabling dragging #6

Closed reesz closed 2 years ago

reesz commented 3 years ago

I'd like to thank you for the great work on this extension. It works like a charm and has almost everything I could think of.

The only feature I can not implement right now is the following scenario:

I only want to open the content-panel via the expand() method, since my bottom sheet has multiple possible actions and switches the content based on which icon in the header is pressed. This means there is no "default" content that can be shown when someone pulls up on the header without clicking an icon, though I would like to keep the ability to pull down to close the panel.

In the source code I've seen that there is an _useDrag property that disables the dragging behaviour if set to false during an animation. Would it be possible to either set this property to public or add another one that is public which can be set to false to ignore the dragging on the header/content when needed? In that case I could disable the dragging when the ExpansionStatus is contracted and enable it again when its expanded.

Thanks for your feedback & wish you a nice day.

Florian,

torbenkeller commented 3 years ago

Hey Florian,

I think for this use case, the modal bottom sheet would fit a bit better than this package. But when you really want to have this feature in the package, feel free to create a PR and when the code looks good, I will merge it.

Torben

alestiago commented 2 years ago

@reesz does #13 solve this issue?