Open bananagag opened 4 years ago
Any updates on this?
Try the following approach. This workaround might not stop the rebuilds but caches the child and fixes the scroll jank. What worked was, to store the widget inside the builder in a variable and return that variable from the builder.
var child;
return SlidingUpPanel(
panelBuilder: (scrollController) {
if(child == null) {
child = SomeScrollableWidget();
}
return child;
}
);
For those of u who want a temporary solution .. Download the source code and make some changes by urself.
Wrap the first Stack of _SlidingUpPanelState within a LayoutBuilder Replace all entries in the source code (panel.dart) with MediaQuery.of(context)... with constraints.maxHeight/maxWidth
Remove/Comment the setState of _onGestureSlide
I don't know which side effects these changes can have. For my purpose it worked.
Try the following approach. This workaround might not stop the rebuilds but caches the child and fixes the scroll jank. What worked was, to store the widget inside the builder in a variable and return that variable from the builder.
var child; return SlidingUpPanel( panelBuilder: (scrollController) { if(child == null) { child = SomeScrollableWidget(); } return child; } );
I've used this and worked. Please fix this issue.
The PanelBuilder is rebuilding too often that it has affected the performance of the scrolling effect when the PanelBuilder's scroll controller is connected to its child widget. You can reference this bug to #94, this can be seen as the duplicate of #94, I am opening this issue only because the bug in that issue seems not fixed, but the topic is already closed.