Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Default animation duration and curve of PageView swipe Animation?

Tags:

flutter

dart

When the pages on page View are swiped it have have a sort of default animation that brings the page to the center of the screen. I want the animation curve and duration of this swipe cool down and animateTo() on button pressed to be the same.

I have tried all different curves and duration none of that matches the default. I have also tried using Custom Scroll Physics.

like image 500
Nishant Subedi Avatar asked Jan 25 '26 15:01

Nishant Subedi


1 Answers

In page_view.dart there's an example:

_pageController.animateToPage(
  0,
  duration: const Duration(milliseconds: 400),
  curve: Curves.easeInOut,
);

I think it's reasonable to assume it uses 400 ms and easeInOut as default.

like image 199
ArtS Avatar answered Jan 28 '26 07:01

ArtS



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!