Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to animate the removal of a PageView.Builder item dynamically

Is it possible to animate the removal of an item in a horizontal PageView.Builder in flutter?

I know there's the AnimatedList but I have been trying to do it on a PageView.Builder as I need a PageView.Builder for my use-case.

I want to make it so once a user presses on an Item from the PageView the item gets removed with an animation. Not Dismissable, but on press.

I would really love if you could point me out to the correct documentation or example.

like image 506
Lambasoft Avatar asked Jan 27 '26 21:01

Lambasoft


1 Answers

Unfortunately there is still not a proper way to do this. You can try combining SlideTransition with animateToPage method of the PageController. But it will not be ideal. It would be optimal if there was a AnimatedListView kind of version for the PageView. Or at least a good way to mimic it.

like image 151
Ercan Tomaç Avatar answered Jan 31 '26 07:01

Ercan Tomaç



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!