Skip to content

SliverFillRemaining does not fill overscroll even with fillOverscroll option #44353

Closed

Description

@radroot1

https://gist.github.com/radroot1/20e9ddb183f638c83258fadf92dfb093
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.15.1 19B88, locale en-RU)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.1)
[✓] VS Code (version 1.35.1)
[✓] Connected device (2 available)

overscroll1

It was normal in previous version of flutter. I do not remember which, but in the gist I attached code of SliverFillRemaining that worked

Activity

  1. added
    f: scrollingViewports, list views, slivers, etc.
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Nov 8, 2019
  2. goderbauer commented on Nov 14, 2019

    @goderbauer
    Member
  3. Piinks commented on Nov 15, 2019

    @Piinks
    Contributor

    Hi @radroot1, thanks for filing this issue.

    It looks like in the gist you have provided, the white Container that is a child of SliverFillRemaining has no size on its own, and in the gif, the extent to which you have scrolled in your list is beyond the size of the screen. In this case SliverFillRemaining has no 'remaining' space to fill, so it defaults to the child's size, which in this case is nothing. I think this is why there is nothing showing up at the end of your list. I also think this is the expected behavior as laid out in the API documentation for SliverFillRemaining.

    You mentioned it working in a previous version of Flutter, would that previous version have included fillOverscroll? Or did that previous version not have the fillOverscroll option? I noticed in your gist you have a CustomSliverFillRemaining that uses an older implementation which does not have the fillOverscroll option. This will help identify the earlier version you referenced.

  4. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 15, 2019
  5. radroot1 commented on Nov 15, 2019

    @radroot1
    Author

    Hello.
    Yes, it did not had that option. Hmm, I just found old log file, I believe it was 1.7.8+hotfix.4

  6. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 15, 2019
  7. Piinks commented on Nov 15, 2019

    @Piinks
    Contributor

    Great! Thanks for that.
    It looks likes that is correct. The fillOverscroll property was introduced in #35810 and was first tagged in v1.8.3.
    The previous implementation of SliverFillRemaining had a bug where it provided enough space to fill the entire screen - rather than the 'remaining' space. Is this the behavior you are expecting?

  8. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 15, 2019
  9. radroot1 commented on Nov 15, 2019

    @radroot1
    Author

    Hmm, I am looking the way to fill overscroll not exactly the sceen, but it seems that this bug is what I need :)

  10. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 15, 2019
  11. Piinks commented on Nov 15, 2019

    @Piinks
    Contributor

    Ok! Can you describe the behavior you would like to see?

  12. radroot1 commented on Nov 15, 2019

    @radroot1
    Author

    The intent is to have a background overscroll different from overall background.
    For example If we have transparency effect in the header part, but we want to keep the color of overscroll to color of the content, this is useful. But right now there is no way to do that through standard components

  13. radroot1 commented on Nov 15, 2019

    @radroot1
    Author

    Hm, fillOverscroll seems to be working when I have child container with Align and not zero height like in example, this is weirdly specific

  14. Piinks commented on Nov 18, 2019

    @Piinks
    Contributor

    You are right! It is very specific. The concept of filling the 'remaining' space in a scroll view is tricky. Scroll views can scroll on infinitely, so setting rules for defining 'remaining' space are strict.

    In the examples you mentioned from the API docs, while the container may not have an explicitly set size, its child does (like an Icon or a Button). This is the size that informs the enclosing sliver.

    I like your idea of being able to use this sliver for just customizing the overscroll area separate from the background, without an actual child to draw otherwise in the scroll view. I'll see if this is something I can adjust to make possible. :)

  15. self-assigned this
    on Nov 18, 2019
  16. radroot1 commented on Nov 19, 2019

    @radroot1
    Author

    OK, thanks :)

  17. Piinks commented on Dec 4, 2019

    @Piinks
    Contributor

    #45121 has been closed in favor of refactoring this widget for better read/review-ability.

    I don't anticipate that delaying this fix for too long, but will keep this updated as the fix gets closer to landing. :)

  18. added this to the January 2020 milestone on Jan 27, 2020
  19. github-actions commented on Aug 23, 2021

    @github-actions

    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.

  20. locked as resolved and limited conversation to collaborators on Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

c: new featureNothing broken; request for a new capabilityf: scrollingViewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.waiting for PR to land (fixed)A fix is in flight

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions