css - "pointer-events: none"(css)在 flutter ?

标签 css mobile flutter

我来自 Web 开发领域,我想了解如何在 flutter “指针事件:无”中实现。在 web 中,此属性使元素处于非事件状态,并且不会对鼠标和传感器的触摸使用react。

最佳答案

将小部件包装在 IgnorePointer 小部件中:

IgnorePointer(
  ignoring: true,
  child: RaisedButton(
    onPressed: () {
      print('pressed');
    },
    child: Text('Press me'),
  ),
);

关于css - "pointer-events: none"(css)在 flutter ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51622318/

相关文章:

javascript - 一次只影响一个 Div - 不工作

html - 图标的 CSS background-position 只显示最后一个图标更多细节见代码

visual-studio - 移动设备网站 - 使用 Visual Studio

redux - 如何让下拉菜单在 Statelesswidget 上工作

具有相同 key.jks 的 Flutter 签名应用程序无法正常工作

flutter - 在启用空安全的应用程序 Dart 内使用非空安全包

javascript - 无法在 Canvas 中引用窗口宽度/高度

div 的 HTML 布局

javascript - 我如何制作可在 android、iphone、ipad 上运行的移动版网站?

iOS Swift 低功耗蓝牙 : Discovering Multiple Characteristics within a Single Service