xuelongqy / flutter_easy_refresh

A flutter widget that provides pull-down refresh and pull-up load.
https://xuelongqy.github.io/flutter_easy_refresh/
MIT License
3.85k stars 630 forks source link

refreshOnStart=true 无效 #741

Open M2dL1fe opened 1 year ago

M2dL1fe commented 1 year ago

将 EasyRefresh 嵌套在ExtendedNestedScrollView的时候,refreshOnStart=true 无效,不执行自动刷新,使用的是V3

xuelongqy commented 1 year ago

设置scrollController试试

M2dL1fe commented 1 year ago

设置了scrollController 可以自动刷新,但是会把最外层NestedScrollView的headerSliverBuilder里面的特性全给干掉了,全都浮在那里,不动了,包括 floatHeaderSlivers = true 这些,通通失效。整个 NestedScrollView 就丧失意义了...变成Column了

xuelongqy commented 1 year ago

ExtendedNestedScrollView

给ExtendedNestedScrollView添加相同的controller,里面不加呢?

M2dL1fe commented 1 year ago

1.能加的都加或者只有NestedScrollView不加,NestedScrollView丧失特性,自动刷新功能ok。 2.只加NestedScrollView或者加NestedScrollView和EasyRefresh,NestedScrollView特性ok ,自动刷新功能失效。

xuelongqy commented 1 year ago

如果内部嵌套多个ScrollView的话 那就不行。建议使用NestedScrollView以外的其他方式实现。目前NestedScrollView配合下拉刷新会存在诸多无法解决的问题

M2dL1fe commented 1 year ago

内部没有嵌套多个...太难了。。。 怀念安卓的CoordinatorLayout丝滑 NestedScrollView( EasyRefresh( ListView() ) )

对了,pull_to_refresh 这个库不用设置scrollController也可以自动刷新...

junixapp commented 9 months ago

同样的问题; Flutter:3.10.6 easy_refresh: 3.3.2+1

场景: NestedScrollView -> PageView -> EasyRefresh 就会无效