fluttercandies / extended_nested_scroll_view

extended nested scroll view to fix following issues. 1.pinned sliver header issue 2.inner scrollables in tabview sync issue 3.pull to refresh is not work. 4.do without ScrollController in NestedScrollView's body
MIT License
591 stars 117 forks source link

ExtendedNestedScrollView中嵌套下拉刷新,会出现页面消失的问题 #88

Closed houziruinb87 closed 2 years ago

houziruinb87 commented 2 years ago

https://user-images.githubusercontent.com/62253657/131961481-fcc6abf8-66e3-4f19-b74a-66500e10d0fa.mp4 现象就是切换不同的TabBarView会出现页面消失的现象,如视频所示。

1.目前项目flutter中使用的是:extended_nested_scroll_view: ^4.0.0 2.下拉刷新使用的是:flutter_easyrefresh: ^2.2.1 #下拉刷新上拉加载控件(https://github.com/xuelongqy/flutter_easyrefresh) 3.打开看了一下easyRefresh下拉刷新源码,easyRefresh这个刷新库是基于CustomScrollView。(话说咱们extended_nested_scroll_view的body里创建TabBarView再通过TabBarView包裹CustomScrollView应该没问题吧) 4.布局结构:ExtendedNestedScrollView(body: TabBarView)-》TabBarView(child: EasyRefresh.custom() -》EasyRefresh.custom(child:SliverPadding) 5.目前我怀疑是 ExtendedNestedScrollView里嵌套CustomScrollView使用的姿势不对?有点懵逼。求大佬指点迷津,感激不尽! image image image

houziruinb87 commented 2 years ago

通过AutomaticKeepAliveClientMixin解决了问题

zmm2tysu commented 1 year ago

@houziruinb87 这个布局,如果list里的数据不满一屏的话,footer组件会在底部而没有挨着最后一个列表项怎么解决啊?