Code Monkey home page Code Monkey logo

Comments (7)

wendux avatar wendux commented on May 14, 2024

这块有更新,可以对照原文重试一下

from flutter-in-action.

r17171709 avatar r17171709 commented on May 14, 2024

@wendux 好像不是吧,我直接看chapter8里面的listener.md,HitTestBehavior.translucent添加之后一样不能穿透。我的flutter版本是1.0.0+1

from flutter-in-action.

wendux avatar wendux commented on May 14, 2024

确定代码和下图中一样(在Stack中),并且点击范围正确吗?
image

from flutter-in-action.

r17171709 avatar r17171709 commented on May 14, 2024

@wendux 你好,我测的结果是,注释掉translucent之后,点击非文本区域,控制台只会打印“down0”,点击文本区域,控制台只会打印“down1”。放开注释之后,非文本区域打印“down1”、“down0”,文本区域只会打印“down1”

from flutter-in-action.

wendux avatar wendux commented on May 14, 2024

对的,这样就是符合预期的,文本区域已经有内容了,所以肯定会参与事件竞争的,只要点击到文本区域,就只会有"down1"

from flutter-in-action.

r17171709 avatar r17171709 commented on May 14, 2024

@wendux 那文章的内容不就是有误了吗,应该是非文本区域没有添加translucent只会打印down0,而不是down1

from flutter-in-action.

wendux avatar wendux commented on May 14, 2024

已更正

from flutter-in-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.