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
AnimatedList/ListView missing elements on scroll #59819
When updating a list in the middle of a scroll, animated list does not render all elements. Everything works as expected if the list is updated while scroll position is in the beginning of the list.
It's not yet clear if the source of this issue is the test case or if it's a real bug. Although further analysis may prove otherwise, I don't think it merits the P0 label. Removing the label now, and reviewing the issue.
This is definitely unexpected, but maybe someone that knows more about ListView/Sliver can say if it's a bug or not.
The docs say "the builder is only called for those children that are actually visible". I don't know if that's a warning against returning non-visible children, but certainly you can work around this issue by not returning empty Containers from itemBuilder.
Also just to make a note of another thing I checked, adding keys to the widgets returned from itemBuilder did not fix the problem.
finished investigation, there is a bug in layout offset calculation in the rendersliver performlayout. The self-correct after the toggle cause a certain child to have layout offset of zero and the sliver list think that child is the first child and refuse to layout anything before it.
Reacted by Justin McCandless and Francesco Iapicca
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
prvenk25 commentedon Jun 19, 2020
Similar issue with ListView as well
[-]AnimatedList missing elements on scroll[/-][+]AnimatedList/ListView missing elements on scroll[/+]iapicca commentedon Jun 19, 2020
Hi @prvenk25
I'm testing your code sample with the latest master
screenshot
doctor
the issue occur as described
thank you for reporting this
HansMuller commentedon Jun 19, 2020
It's not yet clear if the source of this issue is the test case or if it's a real bug. Although further analysis may prove otherwise, I don't think it merits the P0 label. Removing the label now, and reviewing the issue.
justinmc commentedon Jun 19, 2020
@ferhatb I see it in master at least.
justinmc commentedon Jun 19, 2020
This is definitely unexpected, but maybe someone that knows more about ListView/Sliver can say if it's a bug or not.
The docs say "the builder is only called for those children that are actually visible". I don't know if that's a warning against returning non-visible children, but certainly you can work around this issue by not returning empty Containers from itemBuilder.
Also just to make a note of another thing I checked, adding keys to the widgets returned from itemBuilder did not fix the problem.
chunhtai commentedon Jun 19, 2020
finished investigation, there is a bug in layout offset calculation in the rendersliver performlayout. The self-correct after the toggle cause a certain child to have layout offset of zero and the sliver list think that child is the first child and refuse to layout anything before it.
chunhtai commentedon Jun 19, 2020
it is pretty similar to #42142 it is another corner case i wasn't aware when i was fixing that issue
nyzstar commentedon Jun 19, 2020
Do you guys have a recommendation for a short-term work around?
chunhtai commentedon Jun 19, 2020
@nyzstar depending on your use case, This may be avoided if the app does not print out empty box, or each item has slight different sizes.
iapicca commentedon Jun 26, 2020
Hi all,
I confirm is fixed in
github-actions commentedon Aug 19, 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.