Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当页面视图上的页面被滑动时,它有一种默认动画,将页面带到屏幕的中心。我希望此滑动冷却的动画曲线和持续时间以及按下按钮上的 animateTo() 相同。
我尝试了所有不同的曲线和持续时间,但没有一个与默认值匹配。我也尝试过使用自定义滚动物理。
在 page_view.dart 中有一个例子:
_pageController.animateToPage( 0, duration: const Duration(milliseconds: 400), curve: Curves.easeInOut, );
我认为假设它使用 400 毫秒并easeInOut作为默认值是合理的。
easeInOut