Home > OS >  How to remove blue shadow on textbutton when it's pressed (Flutter)
How to remove blue shadow on textbutton when it's pressed (Flutter)

Time:11-05

I'd like to remove the shadow that appears when you press a text button on Flutter, I've looked everywhere and can't find an answer ! Help me please ! Thank you !

CodePudding user response:

You should check the documentation of TextButton and especially the style ButtonStyle. You need to change the overlayColor as per documentation:

The highlight color that's typically used to indicate that the button is focused, hovered, or pressed.

CodePudding user response:

Instead of using TextButton, I recommend you to use Text Widget using GestureDetector. So the Text is there is no shadow color.

Example:

GestureDetector(
    child: Text('Click me'),
    onTap: () {},
)
  • Related