extended_nested_scroll_view
Erweitertes verschachteltes Scrollview zur Behebung von Problemen mit feststehenden Kopfzeilen und der Synchronisation innerer Scrollbare Elemente.
Erweitern Sie den verschachtelten Scrollview, um folgende Probleme zu beheben: 1. Problem mit festgelegtem Sliver-Kopfzeile; 2. Synchronisationsproblem bei inneren Scrollable-Elementen in der TabView; 3. Pull-to-Refresh funktioniert nicht; 4. Ohne ScrollController im Body von NestedScrollView.
{"sdk":"flutter"}^0.4.0+2Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.
pub package GitHub stars GitHub forks GitHub license GitHub issues FlutterCandies QQ 群
NestedScrollView: extended nested scroll view to fix following issues.
2.inner scrollables in tabview sync issue
3.do without ScrollController in NestedScrollView's body
Web demo for ExtendedNestedScrollView
give total height of pinned sliver headers in pinnedHeaderSliverHeightBuilder callback
var tabBarHeight = primaryTabBar.preferredSize.height;
var pinnedHeaderHeight =
//statusBar height
statusBarHeight +
//pinned SliverAppBar height in header
kToolbarHeight;
ExtendedNestedScrollView(
pinnedHeaderSliverHeightBuilder: () {
return pinnedHeaderHeight;
}
) ,
We usually keep list scroll position with following:
| scene | onlyOneScrollInBody | description |
|---|---|---|
| AutomaticKeepAliveClientMixin | true | ScrollPosition will not be disposed, set onlyOneScrollInBody to true so that we can know which list is isActived. |
| PageStorageKey | false | ScrollPosition will be disposed, PageStorageKey just record the position info,the scroll positions in ExtendedNestedScrollView will always single one. |
ExtendedNestedScrollView(
onlyOneScrollInBody: true,
)
Provide ExtendedVisibilityDetector to point out which list is visible
ExtendedVisibilityDetector(
uniqueKey: const Key('Tab1'),
child: ListView(),
)
due to we can't set ScrollController for list in NestedScrollView's body(it will breaking behaviours of InnerScrollController in NestedScrollView),provide Demos
show how to do it without ScrollController
show how to change pinned header height dynamically.