Reputation: 6687
Consider a Stack
with 2 children. How to make the widget on top (along with all its children) ignore touches so the bottom widget can handle them?
Upvotes: 1
Views: 541
Reputation: 268504
You can wrap the widget which should ignore touch in AbsorbPointer
.
Example:
Stack(
children: [
AbsorbPointer(child: Child1()), // it will ignore touches
Child2(),
]
)
Upvotes: 1
Reputation: 53347
What you are looking for is the IgnorePointer
widget, which will enable you to ignore any touch events to its subtree.
Upvotes: 3