【问题标题】:"pointer-events: none"(css) in flutter?“指针事件:无”(css)颤抖?
【发布时间】:2019-01-08 09:03:50
【问题描述】:

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

【问题讨论】:

    标签: css mobile flutter


    【解决方案1】:

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

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

    【讨论】:

    • 很难找到由pointer 对象管理的“触摸”事件。很公平。
    猜你喜欢
    • 2020-06-19
    • 2017-03-25
    • 2014-04-09
    • 2016-08-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-02
    相关资源
    最近更新 更多