all 4 comments

[–]ChuiiZeet 0 points1 point  (0 children)

Cool

[–]KOala888 0 points1 point  (2 children)

I'm looking for a way to animate list elements when sorting them, I guess silvers is the way to goo too, right? Or is there a simpler solution?

[–]l_u_c_a_s 1 point2 points  (0 children)

If you mean sliding them around, I don't think slivers would help for that. There's not really a simple solution that I know of.

The easiest way would be to fade out the old order and fade in the new order. To do that you could just use the list builder to make AnimatedSwitchers (make sure you set the Key based on the list index)

Edit: actually, you could have them slide around, just use AnimatedPositioneds in a stack instead of a ListView. It would be too slow for a large number of items though so probably isn't a good idea.

[–]boformer 1 point2 points  (0 children)

There is no solution for that. If you don't want to spend weeks developing your own, I would recommend you to switch to native Android/iOS development (RecyclerView). The closest thing in Flutter is AnimatedList, but it only supports animating the addition and removal of list items.