Elexer
Elexer

Reputation: 153

Flutter sliding up panel callback

I use sliding_up_panel 1.0.2 from pub.dev, trying to use onPanelClosed callback. For example:

onPanelSlide: (double pos) => setState((){
   collapseIcon = Icons.arrow_circle_down_rounded;
}),

But this same method doesn't work with onPanelClosed, how to use onPanelClosed callback?

Upvotes: 0

Views: 926

Answers (1)

EyaS
EyaS

Reputation: 596

You probably got confused between the functions, onPanelSlide and onPanelClosed. onPanelClosed is called when the panel is closed, while onPanelSlide is called when the panel slides. try to call to onPanelClosed:

onPanelClosed: () => setState((){
    collapseIcon = Icons.arrow_circle_down_rounded;
}),

Upvotes: 1

Related Questions