Problem
I created buttons with custom shape. When the button is pressed, the shadow appears, but I don't need it.
My solution
I set the elevation to 0 ( elevation: 0), but it didn't disable the "onPress" shadow. I set the highlightColor parameter and the shadow color, but I couldn't remove it completely. Finally, I set the shape to the shape of the child Container, but it doesn't work in all situations, I would like to know how to disable the shadow.
Example Code
I was trying to set some properties in ButtonStyle(), but without success.
ElevatedButton(
style: ButtonStyle(),
onPressed: () {},
child: Image.asset(
'assets/mypic.png',
),
),
How it looks like
Question
How do I remove the shadow color in the corners? Can you give me an example of the Button with transparent "onPress" shadow?
