gpt4 book ai didi

dart - Flutter:是否可以通过 PageView 单击?

转载 作者:IT王子 更新时间:2023-10-29 06:51:58 25 4
gpt4 key购买 nike

试图通过将 PageView 包裹在 GestureDetector 周围来使它后面的小部件可点击,但它不起作用。还有其他方法吗?

new GestureDetector(
behavior: HitTestBehavior.translucent,
child: new PageView(
controller: _pageController,
children: _buildForegroundPages(),
),
),

最佳答案

尝试使用 IgnorePointer 类: https://docs.flutter.io/flutter/widgets/IgnorePointer-class.html

A widget that is invisible during hit testing.

关于dart - Flutter:是否可以通过 PageView 单击?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49510694/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com