Custom animation on page change in PageView

252 views
Skip to first unread message

Sekib Omazic

unread,
Apr 8, 2019, 4:25:37 PM4/8/19
to Flutter Dev
Hello there,

is there a way to configure the PageView so that the page change is not animated with a linear curve but more bouncy? Especially when a page snaps to its final position (drag ended). I can achieve the effect when triggering a page change via click on a button with:

IconButton(
icon: Icon(Icons.fast_rewind),
onPressed: () {
pageController.previousPage(
duration: const Duration(milliseconds: 800),
curve: Curves.elasticOut,
);
},
),

Unfortunately this doesn't work for the drag/scroll behaviour. 

Any hint/idea on how to do it would be highly appreciated.


Cheers,

Sekib
Reply all
Reply to author
Forward
0 new messages