【问题标题】:flutter mouse scrolling is not work in horizontal list颤动鼠标滚动在水平列表中不起作用
【发布时间】:2021-11-24 14:52:38
【问题描述】:

我正在制作一个水平的 ListView,并在 ListView 中构建了一些容器。

完成之后,我想在 Web 上测试它,所以我在 ListView 中滚动它,但没有任何反应。

我也试过shift+wheel scroll,但也没有用。

如何在 Flutter Web 上测试 listView?谢谢。

ListView(
  scrollDirection : Axis.horizontal,
  children: <Widget>[
    Container(
      width: 160.0,
      color: Colors.red,
    ),
    Container(
      width: 160.0,
      color: Colors.blue,
    ),
    Container(
      width: 160.0,
      color: Colors.green,
    ),
    Container(
      width: 160.0,
      color: Colors.yellow,
    ),
    Container(
      width: 160.0,
      color: Colors.orange,
    ),
  ],
),

【问题讨论】:

    标签: flutter dart listview scroll


    【解决方案1】:

    我通过在 chrome 中使用调试模式 (F12) 解决了这个问题。

    您可以使用切换设备工具栏(Ctrl + Shift + M),并通过使用它,

    你可以模拟触摸屏。

    谢谢!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-26
      相关资源
      最近更新 更多