Touch events behave correctly if they're on top of the list view
If the listview is scrolled to the top, closing the second panel via the header will also close the first panel
If the listview is not scrolled to the top, attempting to close the second panel with the header will just close the first panel
Expected behavior
Swiping down on the second panel header should always close the second panel, the first panel should not be affected.
For context, I'm trying to reproduce something like this:
https://youtu.be/0MCwl9CpYtg
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
My first thought was to (partially) fix it by using setState to make the first panel undraggable whenever the second one opens, however it seems that running setState will randomly cause the second panel to redraw as closed.
https://www.dartpad.dev/0b8a550ced402e421d9f4e778ae95b6a
Smartphone (please complete the following information):
Device: Oneplus 6, dartpad
OS: Android 10, dartpad/web
Flutter Version 1.20.0-7.4.pre, whatever dartpad uses
sliding_up_panel Version: 1.0.2 (my own local project), master (in the dartpad)
Sample main.dart
Please provide a sample main.dart that reproduces this issue. The code provided here should be able to be run on its own without any external dependencies.
I'm guessing this has something to do with the panelBuilder using a Listener which somehow doesn't properly consume the touch event when dragging the header, so it gets passed onto the panel below.
Describe the bug The touch events on the header of a nested panel using a panelBuilder will get passed onto the parent panel.
To Reproduce Steps to reproduce the behavior:
Expected behavior Swiping down on the second panel header should always close the second panel, the first panel should not be affected. For context, I'm trying to reproduce something like this: https://youtu.be/0MCwl9CpYtg
Screenshots If applicable, add screenshots to help explain your problem.
Additional context My first thought was to (partially) fix it by using setState to make the first panel undraggable whenever the second one opens, however it seems that running setState will randomly cause the second panel to redraw as closed. https://www.dartpad.dev/0b8a550ced402e421d9f4e778ae95b6a
Smartphone (please complete the following information):
Sample
main.dart
Please provide a samplemain.dart
that reproduces this issue. The code provided here should be able to be run on its own without any external dependencies.