首页 > 解决方案 > 如何在 Flutter 中创建垂直滚动的 PageView?

问题描述

默认情况下,PageView 在颤动中具有水平滚动,但我需要通过 PageView 创建一个垂直可滚动的页面,有什么解决方案吗?

标签: androidiosuser-interfaceflutterdart

解决方案


利用scrollDirection: Axis.vertical

PageView(
    controller: pageViewController,
    scrollDirection: Axis.vertical,
    children: [Page1(), Page2(),],
)

推荐阅读