Tapping the container triggers the onTap()
handler but does not show any ink splash effect.
class _MyHomePageState extends State
This is working for me:
Material(
color: Colors.white.withOpacity(0.0),
child: InkWell(
splashColor: Colors.orange,
child: Text('Hello'), // actually here it's a Container wrapping an image
onTap: () {
print('Click');
},
));
After trying many answers here, it was a combination of:
splashColor
InkWell
in Material(color: Colors.white.withOpacity(0.0), ..)
Thanks to the answers here that make those 2 points