akshathjain / sliding_up_panel

A draggable Flutter widget that makes implementing a SlidingUpPanel much easier!
https://pub.dartlang.org/packages/sliding_up_panel
Other
1.38k stars 378 forks source link

Is there a way to make the Slideup expand and then the list inside panel builder scroll? #202

Open RedEagle07 opened 4 years ago

RedEagle07 commented 4 years ago

Im trying to create the same scrolling physics achieved in any draggable widget, to expand first then scroll without having to remove my finger from screen and start a new scroll

chanindev commented 3 years ago

I am having the same issue. anyone please help.

harlanx commented 3 years ago

If anyone is still looking for answer. What you need to do is to check the status of the panel. bool isPanelOpen = slidePanelController.panelPosition.round() == 1

Then in your scrollable widget inside the panel builder set the physics to isPanelOpen ? AlwaysScrollableScrollPhysics() : NeverScrollableScrollPhysics();

MasiaVittorio commented 3 years ago

@harlanx using AlwaysScrollableScrollPhysics() isn't doing it for me. Would you provide some sample code to show how your solution works?

I also need the CustomScrollView in my panel to start scrolling right away instead of releasing the finger and starting to scroll again

harlanx commented 3 years ago

@harlanx using AlwaysScrollableScrollPhysics() isn't doing it for me. Would you provide some sample code to show how your solution works?

I also need the CustomScrollView in my panel to start scrolling right away instead of releasing the finger and starting to scroll again

My bad, I misunderstood the question. My solution I mentioned only prevents the scrollable child widget from having the priority of being scrolled up first.

You could try flutter's DraggableScrollableSheet but you'd lose the ability to animate to a position.

RedEagle07 commented 3 years ago

Is there any fix for that?

akshathjain commented 3 years ago

If I understand your question correctly, you should try to use the panelBuilder with a listview inside. There's an example in the README with this.

ousvat commented 3 years ago

I am also looking for a solution for this problem..