Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interact with widget in Stack with translucent widget covering it

I have a Widget which I want to 'fade out' at the bottom, so I've put it into a Stack with a Container on top of it, with the appropriate gradient as the Container's background. However, the container seems to be consuming all touch events, so I can't interact with the Widget behind it, which is not desirable because the Widget is still mostly visible. Is there any way to change this behaviour?

like image 501
mosh.jinton Avatar asked Jun 21 '26 16:06

mosh.jinton


1 Answers

Here is how to do that:

Code:

IgnorePointer(
  child: YourContainerWidget)

or, depending on your exact objective, you may want to try this:

AbsorbPointer(
  child: YourContainerWidget)

See more info here

like image 56
Canada2000 Avatar answered Jun 23 '26 10:06

Canada2000



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!