Open AboulEinein opened 1 month ago
Hi!
Unfortunately, there is only two states: opened and completely closed
I would like to have another state fullscreen, that would be activated when the user pulls the view up, similar to when the user pulls the view down to close it.
How hard is it to add this functionality? I presume this would need to be handled in BottomSheetPresentationController
, if you could point me to the place where it needs to be handled and any consideration I need to account for and I can try to open a PR with the change.
I presume it should be indeed handled inside BottomSheetPresentationController
But I wouldn't say it's an easy task. At least when I have thought of how it might be implemented, I couldn't find a good answer
I suppose you want something similar to what AppleMaps has
Probably you need to support "partially opened" state Then, when user tries to scroll up, you need to transition to "fully opened" state
You can rule the size by this property https://github.com/joomcode/BottomSheet/blob/15ab2cf96b757b72b09a6515f667685ff55924e1/Sources/BottomSheet/Core/Presentation/BottomSheetPresentationController.swift#L161 But I don't know on the spot, how to make transitions between "partially opened" to "fully opened". Especially if you want interactiveness
The only difference between what AppleMaps and what I want to achieve is that I don't want to expand the BottomSheet when user scrolls inside it, it would fully open when you hold the pull bar and swipe up. Similar to the behavior in YouTube Chat drawer has
How can expand the ButtomSheet by pulling the Pull Bar up?