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.36k stars 378 forks source link

Buttons inside the collapsed panel is not working at some time. #201

Open yocyocdearwolves opened 3 years ago

yocyocdearwolves commented 3 years ago

I have noticed that when the widget rebuilds and the panel is open the buttons inside the collapsed panel will not work anymore. Everything works fine until you use rebuilding methods like setState or you navigate to a new screen when the panel is open.

mr-muhammad-rehan commented 3 years ago

So I just face the same issue: I am using GetX for state management, i couldn't use setState(){} for no reason.

GetBuilder( builder: () => SlidingUpPanel( onPanelOpened: (){ /// Re-render elements for no reason :P .refreshPage(); } ), ... ) ChangeNotifierProvider

You can find onPanelOpened where you need to re-render the screen again either you are using Provider. You just need to call update() of GetX OR update() OR SetState(){}.

ccastroelo commented 3 years ago

Thanks, this solved my problem.

ShookLyngs commented 3 years ago

So I just face the same issue: I am using GetX for state management, i couldn't use setState(){} for no reason.

GetBuilder( builder: () => SlidingUpPanel( onPanelOpened: (){ /// Re-render elements for no reason :P .refreshPage(); } ), ... ) ChangeNotifierProvider

You can find onPanelOpened where you need to re-render the screen again either you are using Provider. You just need to call update() of GetX OR update() OR SetState(){}.

I'm also facing the problem, when I opened the panel, sometimes buttons inside the panel cannot be tapped. And when I closed the panel, buttons in collapsed widget, sometimes cannot tapped either.

Like you, I'm also using GetX for state management, but I don't understand, what did _.refreshPage() do?