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
Just as ListView has a ListView.separated() option to create a ListView with custom dividers, AnimatedList should have a similar option to space out the items.
How should the separator builder handle the case of an item being inserted or removed?
Implementing the separatorBuilder as just an IndexedWidgetBuilder would mean the separator would suddenly appear or disappear when the child next to it started appearing or stopped disappearing, which is rather jarring.
@Hixie could we pass the animation the separator builder as well? That way developers can decide how the separators should behave. I would really like to use an AnimatedList.seperated :)
If anyone would like help developing a PR for this, feel free to ping me (@Hixie) on the #hackers-new channel on Discord! See the contributing docs for details.
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
sanalkv commentedon Jun 3, 2020
mregnauld commentedon Jan 3, 2021
carman247 commentedon May 18, 2021
If you can track the length of your list this might be a temporary solution
Crdzbird commentedon Sep 19, 2021
christianfrid commentedon Dec 7, 2021
K9RYM commentedon Mar 12, 2022
another lightweight solution to add a divider strip to the items:
DzonaTheSymbol commentedon Aug 23, 2022
Hixie commentedon Jul 20, 2023
How should the separator builder handle the case of an item being inserted or removed?
Implementing the separatorBuilder as just an IndexedWidgetBuilder would mean the separator would suddenly appear or disappear when the child next to it started appearing or stopped disappearing, which is rather jarring.
peter-trost commentedon Feb 1, 2024
@Hixie could we pass the animation the separator builder as well? That way developers can decide how the separators should behave. I would really like to use an AnimatedList.seperated :)
Hixie commentedon Feb 1, 2024
Seems plausible.
If anyone would like help developing a PR for this, feel free to ping me (@Hixie) on the #hackers-new channel on Discord! See the contributing docs for details.
Feature: Add AnimatedList with separators (#144899)
Hixie commentedon Jun 7, 2024
Thanks to @Peetee06 for fixing this one!
github-actions commentedon Jun 21, 2024
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.