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.89k stars 633 forks source link

Each Easy Refresh on TabBarView is Triggered #725

Open sed1ka opened 1 year ago

sed1ka commented 1 year ago

Easy Refresh Version: 3.3.2+1

Flutter Version: 3.10.1

Description: First I also use a ExtendedNestedScrollView library. My implement is using single easy refresh for each tab. The widget structure like:

StatelessWidget class
DefaultTabController
    ExtendedNestedScrollView
        headerSliverBuilder: SliverAppBar (I put the tabs on this Widget)
        body: TabBarView
                    children: [
                      EasyRefresh
                          CustomScrollView
                              SliverList

                      EasyRefresh
                          CustomScrollView
                              SliverList

                      EasyRefresh
                          CustomScrollView
                              SliverList
                   ],

(sorry I cant create a reproduce sample code this time)

But with the widget structure, issue happen. When I scrolling down the First TabBarView, other TabBarView follow the scroll. When I try to pull to refresh, easy refresh in each TabBarView also triggered.

To Note: My widget structure in other project is working fine when I use another pull to refresh library.

Based on the example code: https://github.com/xuelongqy/flutter_easy_refresh/blob/v3/example/lib/page/sample/nested_scroll_view.dart

So my question is using IndexedStack required than TabBarView or what happenned on me is bug?

xuelongqy commented 1 year ago

You can try using ExtendedVisibilityDetector.

sed1ka commented 1 year ago

Already did, but still not working

wosika commented 1 year ago

i have same question too.