sliding_up_panel icon indicating copy to clipboard operation
sliding_up_panel copied to clipboard

Add a way to attach widgets to the top border

Open subzero911 opened this issue 3 years ago • 2 comments

That's what I want to achieve image

I know it's not very beautiful, but it's a design I have to do. These choice buttons should move with panel sticking to its top. The problem is I cannot just wrap a panel or header into Stack and use Positioned, because a panel crops everything that is out. image

Now the only way is a dynamically calculate a widget position in onPanelSlide callback, as described in a video below (super inconvenient) https://youtu.be/s9XHOQeIeZg?t=527

Make an option to not to crop outside the panel or an additional field for attached widgets.

subzero911 avatar Jan 20 '22 11:01 subzero911

Oh, the fix above doesn't solve the issue You can draw the widgets outside the Stack but cannot make them clickable. Those buttons will not react to gestures. It's a known issue of the Stack which won't be fixed. https://stackoverflow.com/questions/62258640/flutter-overflowed-positioned-button-is-not-clickable https://github.com/flutter/flutter/issues/19445

So the problem is still open.

subzero911 avatar Jan 21 '22 12:01 subzero911

I used this method https://youtu.be/s9XHOQeIeZg it also has a problem that attached buttons are wobbling when dragging the sheet up and down. See the video: https://disk.yandex.ru/i/0Z4Rn1UVcvM9Ew It's because their positions are recalculated and redrawn in response to the panel dragging, and it slightly delays.

subzero911 avatar Aug 10 '22 12:08 subzero911