You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SliverFillRemaining fill more than remaining space available #17444
Same thing happens to me. Having CustomScrollView with SliverAppBar, SliverList using SliverChildBuilderDelegate and SliverFillRemaining results in SliverFillRemaining's height equal to viewport's height. So I can scroll until last element of the list is scrolled out of the screen.
Was looking at this with @chunhtai and @Piinks - it seems like changing line 127 of sliver_fill.dart to
scrollExtent: extent,
Fixes this but breaks the nested scroll view tests. It's possible those nested scroll view tests are incorrect. @Piinks says she'll look into it a bit more.
... it seems like changing line 127 of sliver_fill.dart to
scrollExtent: extent,
Fixes this but breaks the nested scroll view tests. It's possible those nested scroll view tests are incorrect.
This appears to not only break the NestedScrollView tests, but also breaks the expected physics in regards to the iOS bounce at the top and bottom of the CustomScrollView.
When replacing with scrollExtent: constraints.scrollOffset, I get the expected behaviour.
Does seem to work for this issue. I think that the use cases for SliverFillRemaining on its own in the sample code above and within NestedScrollView have different behavior expectations.
I have a PR up now (#33627) that instead creates a flag for SliverFillRemaining to be able to specify which behavior you want from this widget. Currently, it defaults to work appropriately in this situation.
I'm not sure what @Piinks PR fixed here? @dnfield solution to
seems like changing line 127 of sliver_fill.dart to
scrollExtent: extent,
Isn't available anymore, and the issue is not related to NestedScrollViews. The issue still exists
@magpiedigital I would recommend filing a new issue with a code sample that reproduces the bug you are experiencing along with the output of flutter doctor -v . Feel free to ping me on it and we can take a look! :)
It's the same issue as the OP and their code is all you need to reproduce the bug. Just scroll down. Perhaps I'm wrong, but my expected behavior is that it works like a sliver version of Expanded widget.
It's the same issue as the OP and their code is all you need to reproduce the bug. Just scroll down. Perhaps I'm wrong, but my expected behavior is that it works like a sliver version of Expanded widget.
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 flutter doctor -v and a minimal reproduction of the issue.
Activity
kbrz commentedon May 31, 2018
Same thing happens to me. Having
CustomScrollViewwithSliverAppBar,SliverListusingSliverChildBuilderDelegateandSliverFillRemainingresults inSliverFillRemaining's height equal to viewport's height. So I can scroll until last element of the list is scrolled out of the screen.figengungor commentedon Oct 26, 2018
+1
fit-aditya commentedon Nov 15, 2018
I can confirm this is the behavior as of 0.11.3, any workarounds?
Edit: there is some unexpected behavior -
How is scrolling adding height to the SliverFillRemaining?
lubritto commentedon Jan 15, 2019
@zoechi Any update ?
aloisdeniel commentedon Apr 10, 2019
Not working for me too.
After profiling the source code, it seems that the issue comes from :
aloisdeniel@54952a9#diff-85d3eb0d3e238772f866f76eab9b7acd
When replacing with
scrollExtent: constraints.scrollOffset,I get the expected behaviour.thekeenant commentedon Apr 11, 2019
This helped me out: https://pub.dartlang.org/packages/sliver_fill_remaining_box_adapter
I didn't look into how it works/fixed the issue I was facing, but it seems related to the issue reported here.
minhdtb commentedon Apr 30, 2019
I got the same issue. Any update now?
dnfield commentedon May 15, 2019
Was looking at this with @chunhtai and @Piinks - it seems like changing line 127 of sliver_fill.dart to
Fixes this but breaks the nested scroll view tests. It's possible those nested scroll view tests are incorrect. @Piinks says she'll look into it a bit more.
ziakhan110 commentedon May 26, 2019
any fix for this yet?
Piinks commentedon May 30, 2019
This appears to not only break the
NestedScrollViewtests, but also breaks the expected physics in regards to the iOS bounce at the top and bottom of theCustomScrollView.Does seem to work for this issue. I think that the use cases for
SliverFillRemainingon its own in the sample code above and withinNestedScrollViewhave different behavior expectations.I have a PR up now (#33627) that instead creates a flag for
SliverFillRemainingto be able to specify which behavior you want from this widget. Currently, it defaults to work appropriately in this situation.chloe722 commentedon Jun 14, 2019
+1
eliwowlol123 commentedon Apr 12, 2020
thanks, you are a g-d
niallshaw commentedon Jun 8, 2020
I don't think this issue should be closed.
galacticgibbon commentedon Jul 13, 2020
I'm not sure what @Piinks PR fixed here?
@dnfield solution to
Isn't available anymore, and the issue is not related to NestedScrollViews. The issue still exists
Piinks commentedon Jul 13, 2020
@magpiedigital I would recommend filing a new issue with a code sample that reproduces the bug you are experiencing along with the output of
flutter doctor -v. Feel free to ping me on it and we can take a look! :)galacticgibbon commentedon Jul 13, 2020
It's the same issue as the OP and their code is all you need to reproduce the bug. Just scroll down. Perhaps I'm wrong, but my expected behavior is that it works like a sliver version of Expanded widget.
Piinks commentedon Jul 13, 2020
The OP was solved by the introduction of
SliverFillRemaining.hasScrollBody, which defaults to true. By default,SliverFillRemainingwill maintain the behavior of the OP, but by usinghasScrollBody: false, it is solved. There are several sample apps that demonstrate different use cases in the api documentation: https://master-api.flutter.dev/flutter/widgets/SliverFillRemaining-class.htmlIf you find you are still experiencing an issue, please file a new bug. Thanks! :)
dvirgiln commentedon Feb 5, 2021
I opened a similar issue. It seems that using TabBar and setting
hasScrollBody:falsedoes not make it to work.#75517
dvirgiln commentedon Feb 5, 2021
@Piinks could you have a look to the ticket I opened. It is quite related.
Thanks
github-actions commentedon Aug 6, 2021
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
flutter doctor -vand a minimal reproduction of the issue.