I am trying to make my Image.asset() in Flutter have a ripple effect whenever the image is tapped
Below are my image assets
Image.asset('images/ic_close.png')
I have tried placing it inside InkWell and providing a splash color but it's also not working. Below is how I have tried to achieve a ripple effect using InkWell
InkWell(
splashColor: Colors.black87,
onTap: () {
Navigator.pop(context);
},
child: Image.asset('images/ic_close.png'),
)
You have to wrap your Inkwell also with transparent Material widget. If your Image have no background, it will work like this (because you see it through its transparent parts):
If you want to overlay your full image, I only found a ways with stack. Like: