-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RefreshIndicator breaks when the ListView has a ScrollController #22180
Comments
+1 |
@sdabbo Using "add reaction" on the initial comment would increase priority while |
I found a similar problem, if make ListView.builder inside SingleChildScrollView, onRefresh does not work. A piece of code: RefreshIndicator(
onRefresh: ...
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: ListView.builder(),
),
) |
@tevjef body: RefreshIndicator(
onRefresh: _refresh,
child: ListView.builder(
controller: _controller,
physics: const AlwaysScrollableScrollPhysics(),
itemCount: items.length,
itemBuilder: (context, index) => ListTile(
title: Text('Item ${items[index]}'),
),
),
) The core code is : |
Moreover in the case ScrollController breaks behaviour of SliverAppBar and CupertinoSliverNavigationBar. I mean behaviour when AppBar scrolls with a content. The issue looks what I mean #31898 |
I had the same issue, but in my ListView Builder, I forget to remove shrinkWrap: true |
I had the same issue too,and i want to listen the listView scroll,but i found the scrollController dont'work |
tsx1453's code also worked for me. |
When using scrollDirection: Axis.horizontal on ListView, RefreshIndicator is don't working :/ |
ScrollController doesn't work when ListView is not full screen |
As said above the solution is to set the The child widget is not scrollable when the ScrollController is provided as it will set the To make it more clear that the child is required to be scrollable, we should update the documentation. See PR: #50345 |
@yk3372 <= His code is working for me, thanks and appreciate the flutter community. |
The solution does not work with the below code. SingleChildScrollView( |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
When using a ScrollController one ListView, OverscrollNotifications are not sent to RefreshIndicator when all list items fit on screen. As such you cannot pull to refresh.
Comments in the code indicate what you need to do to replicate this bug.
The text was updated successfully, but these errors were encountered: