fluttercandies/extended_nested_scroll_view
À propos
NestedScrollView étendu pour résoudre les problèmes suivants : 1. problème avec les en-têtes Sliver épinglés ; 2. problème de synchronisation des éléments défilables internes dans TabView ; 3. l’actualisation par balayage vers le bas ne fonctionne pas ; 4. utilisation du body de NestedScrollView sans ScrollController.
Développement web et applicatifProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
Originalextended_nested_scroll_view
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
- extended_nested_scroll_view
- Example for issue 1
- Example for issue 2
- Do without ScrollController in NestedScrollView's body
Example for issue 1
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;
}
) ,
Example for issue 2
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,
)
ExtendedVisibilityDetector
Provide ExtendedVisibilityDetector to point out which list is visible
ExtendedVisibilityDetector(
uniqueKey: const Key('Tab1'),
child: ListView(),
)
Do without ScrollController in NestedScrollView's body
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.
Explorer des projets similaires
Chargement…