sliding_up_panel
sliding_up_panel copied to clipboard
Click ExpandedPanel but triggers CollapsedPanel content
Describe the bug
To trigger the bug when the
panelwas expanded:
In collapsed, we have a TextField.
In panel, we have a Text.
When the panel is open, the content of collapse is hidden, but it's touchable.
We can just click where the TextField were, and the soft keyboard will pop in.
In this situation, if the content in panel is a Button instead of Text, the Button will be untouchable.
To trigger the bug in when the
panelwas collapsed:
We can also trigger the same bug on collapsed by replacing the content of panel, to a scrollable list.
First, we open the panel. Then, we scroll the list of panel.
Finally, we close the panel. now the content in collapsed is untouchable.
Code sample
Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: SlidingUpPanel(
collapsed: Column(children: [
TextField(),
]),
panel: Center(
child: Text("This is the sliding Widget"),
),
body: Center(
child: Text("This is the Widget behind the sliding panel"),
),
),
)
I'm experiencing this same issue.
I fixed this by wrapping my collapsed widget in a Visibility widget, and updating its visibility with:
onPanelOpened: () => { setState(() { _collapsedVisible = false; }) }, onPanelClosed: () => { setState(() { _collapsedVisible = true; }) },
I have the same issue from my application the collapsed widget is clickable, even if am on panel widget.
This is my collapsed widget:

This is my panel widget:

When am on panel widget, i can click over sign in or sign up widget. as it's invisible but touchable still.
same issue
fixed I use Getx state management
- Wrap
collapsedwithIgnorePointerwidget - wrap
panelwithVisibilitywidget - in controller
void slidePanel(double value) {
animateOpacity.value = value;
// pannel visibility
if (value == 0.0) {
panelVisibility.value = false;
} else {
panelVisibility.value = true;
}
}
- on
onPanelSlide
onPanelSlide: (position) {
_homecontroler.slidePanel(position);
},
work well for me