Page: https://renderobjects.com/guides/hit-testing/#the-hittest-method
Selected text is bolded below, with the surrounding paragraph(s) for context:
The hitTest Method#
Potential suggestion: A common mistake beginners make is to assume that RenderBox.hitTest returns true if the position is in the current render object. However, that is incorrect. Instead, RenderBox.hitTest returns whether hit testing was concluded by this render object or one of its children. In other words, a render object that is hit should return false if it wants hit testing to continue.
I'd consider adding a quick explanation on this behavior since this is common misunderstanding. In hindsight, perhaps we should've made hitTest return an enum to make this behavior much more obvious (eg HitTestStatus.absorbed, HitTestStatus.continue)
Page: https://renderobjects.com/guides/hit-testing/#the-hittest-method
Selected text is bolded below, with the surrounding paragraph(s) for context:
Potential suggestion: A common mistake beginners make is to assume that
RenderBox.hitTestreturnstrueif the position is in the current render object. However, that is incorrect. Instead,RenderBox.hitTestreturns whether hit testing was concluded by this render object or one of its children. In other words, a render object that is hit should returnfalseif it wants hit testing to continue.I'd consider adding a quick explanation on this behavior since this is common misunderstanding. In hindsight, perhaps we should've made
hitTestreturn an enum to make this behavior much more obvious (egHitTestStatus.absorbed,HitTestStatus.continue)