Comments (2)
I found a solution and it works fine.
I see that the ScrollController in the source code is created like this:
// prevent the panel content from being scrolled only if the widget is
// draggable and panel scrolling is enabled
_sc = new ScrollController();
_sc.addListener(() {
if (widget.isDraggable && !_scrollingEnabled) _sc.jumpTo(0);
});
Then we can extend the PanelController of sliding_up_panel to have the ability to set ScrollController.
Add a setScrollController method to PanelController:
void setScrollController(ScrollController sc) {
_panelState!.sc = sc;
}
Then change the ScrollController of the Panel when jumping to another page and returning to the page,like this:
double offset = listController?.offset ?? 0;
panelController.setScrollController(listScrollController);
Navigator.push(...).then((value) {
panelController.setScrollController(detailScrollController);
listController?.jumpTo(offset);
});
from sliding_up_panel.
This is my demo, if you need it, I hope it can help you.
https://github.com/pengboboer/flutter_comment_panel_example
from sliding_up_panel.
Related Issues (20)
- RefreshIndicator doesn't work with panelBuilder
- in SlideDirection.DOWN listview is unscrollable even with panelBuilder
- Firebase Crashlytics _SlidingUpPanelState._onGestureSlide HOT 1
- The area at the top of the sliding up panel is not clickable HOT 4
- Still maintained ? HOT 6
- [sliding_up_panel] can't scroll embed Native scroll view in SlidingUpPannel
- [Bug] sometimes the collapsed widget is not touchable anymore HOT 1
- SlidingUpPanel is dragging down when I start scrolling horizontal list inside Panel HOT 1
- error: The named parameter 'panel' isn't defined.
- Is it possible to touch other views on top of the istview to swipe to close the panel when the listview scrolls up a certain distance? HOT 3
- When the Listview position is at 0, calling the jumpTo or animateTo methods of ScrollController is invalid. HOT 2
- Half panel content disappear when moving back from other screen [iOS]
- Cannot Center 'header' HOT 2
- [Suggestion] Make snapping have more "tolerance" for user gestures
- How to set min height to 1.0(full height) and can scroll to 0.0(bottom).
- Cannot open panel on Desktop, mobile is working fine.
- is this responsive for any mobile phone?
- Backdrop's GestureDetector should be excluded from semantics HOT 1
- Can max height of the panel be changed to the child height inside the panel HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sliding_up_panel.