Let's say you have a widget of Image but you want to add a click effect on image.
Putting it inside a button is a bad idea. I have something suitable solution for it.
Widget getImageButton() {
return InkWell(
child: Image.asset(
"assets/branding/three_speak_icon.png",
width: 60,
height: 60,
),
onTap: () {
log('User tapped on this image');
}
)
}
Here is how I was able to make clickable views for the app on which I am working using the same code snippet above.